Allow wmem_strbuf_append_len() to append strings beginning with NUL byte

wmem_strbuf_append_len is for appending strings with embedded nulls,
so it shouldn't return early if the first byte of the string passed in
is null. The check for the string itself being null and the append_len
being zero is sufficient.
This commit is contained in:
John Thacker 2020-10-17 15:28:19 -04:00 committed by Wireshark GitLab Utility
parent ca337f1c1d
commit 232d3866af
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ void
wmem_strbuf_append_len(wmem_strbuf_t *strbuf, const gchar *str, gsize append_len)
{
if (!append_len || !str || str[0] == '\0') {
if (!append_len || !str) {
return;
}