1
0
Fork 0
mirror of https://github.com/pygos/init.git synced 2024-11-22 11:19:45 +01:00

Do not allow embedding null-bytes into a string

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-04-11 15:05:59 +02:00
parent 67d000cdc3
commit dca72a4c77

View file

@ -80,6 +80,9 @@ int unescape(char *src)
default: default:
return -1; return -1;
} }
if (c == 0)
return -1;
} }
*(dst++) = c; *(dst++) = c;