forked from github/server
CID 22445 Unchecked return value
This commit is contained in:
parent
f78fe84216
commit
e6973ff394
|
@ -97,7 +97,12 @@ char * transliterate(char * out, size_t size, const char * in)
|
|||
}
|
||||
else {
|
||||
ucs4_t ucs;
|
||||
unicode_utf8_to_ucs4(&ucs, src, &len);
|
||||
int ret = unicode_utf8_to_ucs4(&ucs, src, &len);
|
||||
if (ret != 0) {
|
||||
/* encoding is broken. yikes */
|
||||
log_error("transliterate | encoding error in '%s'\n", src);
|
||||
return NULL;
|
||||
}
|
||||
src += len;
|
||||
*dst++ = '?';
|
||||
--size;
|
||||
|
|
Loading…
Reference in New Issue