assert value!=NULL in fix_utf8()
We must never pass value==NULL to fix_utf(). Replace the run-time check with an assertion.
This commit is contained in:
parent
f99fe80811
commit
92b757674e
@ -350,7 +350,9 @@ int tag_equal(struct tag *tag1, struct tag *tag2)
|
|||||||
static inline char *fix_utf8(char *str) {
|
static inline char *fix_utf8(char *str) {
|
||||||
char *temp;
|
char *temp;
|
||||||
|
|
||||||
if (str != NULL && validUtf8String(str))
|
assert(str != NULL);
|
||||||
|
|
||||||
|
if (validUtf8String(str))
|
||||||
return str;
|
return str;
|
||||||
|
|
||||||
DEBUG("not valid utf8 in tag: %s\n",str);
|
DEBUG("not valid utf8 in tag: %s\n",str);
|
||||||
|
Loading…
Reference in New Issue
Block a user