diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-01-08 15:30:38 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-01-09 20:20:49 +0100 |
| commit | bdc6d550b0c49d0b131872fb71f1f40288a10147 (patch) | |
| tree | f74546a022c28b67039f00d61284c25f0f6b59ff /csource | |
| parent | c5f38186d296b1e4ce59cb51889bce481cce266d (diff) | |
executor: use NONFAILING strcpy in syz_open_dev
The source is fuzzer provided memory, it can be non-addressable.
Diffstat (limited to 'csource')
| -rw-r--r-- | csource/common.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/csource/common.go b/csource/common.go index 5310ef0b5..a0b063e9d 100644 --- a/csource/common.go +++ b/csource/common.go @@ -259,7 +259,7 @@ static uintptr_t syz_open_dev(uintptr_t a0, uintptr_t a1, uintptr_t a2) } else { char buf[1024]; char* hash; - strncpy(buf, (char*)a0, sizeof(buf)); + NONFAILING(strncpy(buf, (char*)a0, sizeof(buf))); buf[sizeof(buf) - 1] = 0; while ((hash = strchr(buf, '#'))) { *hash = '0' + (char)(a1 % 10); |
