yarrick / iodine

Official git repo for iodine dns tunnel
https://code.kryo.se/iodine
ISC License
6.26k stars 508 forks source link

Fix gcc warning -Wsizeof-pointer-memaccess #2

Closed mscherer closed 10 years ago

mscherer commented 10 years ago

iodined.c: In function ‘write_dns_nameenc’: iodined.c:2030:23: attention : argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memset(buf, 0, sizeof(buf));

sizeof buf will just give the size of the pointer, while buflen will clean the whole memory.

yarrick commented 10 years ago

Thanks!