Commit 1afe5545 authored by Michael Tremer's avatar Michael Tremer

stringpool: Do not call strlen() on potential NULL pointer

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent bf4ac66f
......@@ -208,6 +208,8 @@ LOC_EXPORT struct loc_stringpool* loc_stringpool_unref(struct loc_stringpool* po
static off_t loc_stringpool_get_next_offset(struct loc_stringpool* pool, off_t offset) {
const char* string = loc_stringpool_get(pool, offset);
if (!string)
return offset;
return offset + strlen(string) + 1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment