1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-23 01:52:48 +03:00

encoding: Fix error code in asciiToUTF8

Use correct error code when invalid ASCII bytes are encountered.

Found by OSS-Fuzz.
This commit is contained in:
Nick Wellnhofer
2023-03-26 15:42:02 +02:00
parent 3660229219
commit a6b9e55a9e

View File

@@ -197,7 +197,7 @@ asciiToUTF8(unsigned char* out, int *outlen,
} else {
*outlen = out - outstart;
*inlen = processed - base;
return(-1);
return(-2);
}
processed = (const unsigned char*) in;