diff options
author | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-04-11 15:05:59 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-04-11 15:05:59 +0200 |
commit | dca72a4c778cbe55975508ebce22db2105c26ee0 (patch) | |
tree | ae75deae1a9e41f4f020b32941c850509748dfba | |
parent | 67d000cdc37009a975d0794f6fd347dfb17743eb (diff) |
Do not allow embedding null-bytes into a string
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
-rw-r--r-- | lib/src/unescape.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/src/unescape.c b/lib/src/unescape.c index ea5c9e2..2d48c92 100644 --- a/lib/src/unescape.c +++ b/lib/src/unescape.c @@ -80,6 +80,9 @@ int unescape(char *src) default: return -1; } + + if (c == 0) + return -1; } *(dst++) = c; |