diff options
author | Robert Swiecki <robert@swiecki.net> | 2018-01-09 20:06:58 +0100 |
---|---|---|
committer | Robert Swiecki <robert@swiecki.net> | 2018-01-09 20:06:58 +0100 |
commit | c4b067be83c0406f94412d49344b627d095e3dac (patch) | |
tree | bc76be52ff24c1588cbfbb31e5b7829e4d743e86 /fuzz.c | |
parent | 702ca7061652ed31a00eac28b327a010a6899c8a (diff) | |
download | honggfuzz-c4b067be83c0406f94412d49344b627d095e3dac.tar.gz |
fuzz: correct version of pthread_setname_np
Diffstat (limited to 'fuzz.c')
-rw-r--r-- | fuzz.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -632,8 +632,10 @@ static void* fuzz_threadNew(void* arg) { unsigned int fuzzNo = ATOMIC_POST_INC(hfuzz->threads.threadsActiveCnt); LOG_I("Launched new fuzzing thread, no. #%" PRId32, fuzzNo); - if (pthread_setname_np(pthread_self(), "HFUZZ-%" PRId32) != 0) { - PLOG_W("pthread_setname_np(pthread_self()) failed"); + char tname[16]; + snprintf(tname, sizeof(tname), "HFUZZ-%" PRId32, fuzzNo); + if (pthread_setname_np(pthread_self(), tname) != 0) { + PLOG_W("pthread_setname_np(pthread_self(), '%s') failed", tname); } run_t run = { |