diff options
Diffstat (limited to 'pkg/csource/linux_common.go')
| -rw-r--r-- | pkg/csource/linux_common.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/csource/linux_common.go b/pkg/csource/linux_common.go index 06fc09137..77ba9b36f 100644 --- a/pkg/csource/linux_common.go +++ b/pkg/csource/linux_common.go @@ -765,7 +765,7 @@ static uintptr_t syz_open_dev(uintptr_t a0, uintptr_t a1, uintptr_t a2) } else { 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); |
