]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic: remove an assertion from cunescape_one
authorEvgeny Vereshchagin <evvers@ya.ru>
Fri, 16 Nov 2018 06:05:29 +0000 (07:05 +0100)
committerEvgeny Vereshchagin <evvers@ya.ru>
Fri, 16 Nov 2018 07:45:16 +0000 (08:45 +0100)
The function takes a pointer to a random block of memory and
the length of that block. It shouldn't crash every time it sees
a zero byte at the beginning there.

This should help the dev-kmsg fuzzer to keep going.

src/basic/escape.c

index 5004763d978c61b3af9857b4d6490fa992a68d86..5f715156fbf407e6c03d1a1839147ac7e76dbc96 100644 (file)
@@ -106,7 +106,6 @@ int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit)
         int r = 1;
 
         assert(p);
-        assert(*p);
         assert(ret);
 
         /* Unescapes C style. Returns the unescaped character in ret.