Skip to content

gmarkup: Fix unvalidated UTF-8 read in markup parsing error paths

Philip Withnall requested to merge pwithnall/glib:1462-bookmark-overflow into master

When formatting the error messages for markup parsing errors, the parser was unconditionally reading a UTF-8 character from the input buffer — but the buffer might end with a partial code sequence, resulting in reading off the end of the buffer by up to three bytes.

Fix this and add a test case, courtesy of pdknsk.

Signed-off-by: Philip Withnall withnall@endlessm.com

#1462 (closed)

Closes #1462 (closed)

Merge request reports