Skip to content

Backport !4348 “gdatainputstream: Fix length return value on UTF-8 validation failure“ to glib-2-82

The method was correctly returning an error from g_data_input_stream_read_line_utf8() if the line contained invalid UTF-8, but it wasn’t correctly setting the returned line length to 0. This could have caused problems if callers were basing subsequent logic on the length and not the return value nullness or GError.

Signed-off-by: Philip Withnall pwithnall@gnome.org

oss-fuzz#372819437


Straightforward backport of !4348 (merged) to glib-2-82. There was one minor cherry pick conflict in the first commit (but not the second).

Merge request reports

Loading