diff options
Diffstat (limited to 'executor/common_linux.h')
| -rw-r--r-- | executor/common_linux.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index 0b1f5c72a..45a74e36f 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -645,7 +645,7 @@ static uintptr_t syz_open_dev(uintptr_t a0, uintptr_t a1, uintptr_t a2) // syz_open_dev(dev strconst, id intptr, flags flags[open_flags]) fd char buf[1024]; char* hash; - NONFAILING(strncpy(buf, (char*)a0, sizeof(buf))); + NONFAILING(strncpy(buf, (char*)a0, sizeof(buf) - 1)); buf[sizeof(buf) - 1] = 0; while ((hash = strchr(buf, '#'))) { *hash = '0' + (char)(a1 % 10); // 10 devices should be enough for everyone. |
