From bdc6d550b0c49d0b131872fb71f1f40288a10147 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 8 Jan 2017 15:30:38 +0100 Subject: executor: use NONFAILING strcpy in syz_open_dev The source is fuzzer provided memory, it can be non-addressable. --- csource/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'csource') 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); -- cgit mrf-deployment