diff options
author | Karl Berry <karl@freefriends.org> | 2023-08-28 22:32:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-08-28 22:32:09 +0000 |
commit | d50f865710d067bf6ae293f048279834bed70b79 (patch) | |
tree | ded8b321c616b0c8af2acd74c83283b51ee1f930 | |
parent | 5f22ff48b03148705faf00ee50ac2cf64b04ca1a (diff) |
guard against undump of corrupt .fmt
git-svn-id: svn://tug.org/texlive/trunk@68100 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/ChangeLog | 7 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/tounicode.c | 9 |
2 files changed, 15 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index 18e28273495..f270c615f1a 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,10 @@ +2023-08-28 Karl Berry <karl@freefriends.org> + + * tounicode.c (undump_to_unicode): check that gu->name + (and gu->unicode_seq) did not undumped as NULL. + Report from Gregory DUCK, + https://tug.org/pipermail/tex-live/2023-August/049406.html. + 2023-08-27 TANAKA Takuji <ttk@t-lab.opal.ne.jp> * tests/{cnfline,partoken}.test: diff --git a/Build/source/texk/web2c/pdftexdir/tounicode.c b/Build/source/texk/web2c/pdftexdir/tounicode.c index e658064abb0..e57c36f6be4 100644 --- a/Build/source/texk/web2c/pdftexdir/tounicode.c +++ b/Build/source/texk/web2c/pdftexdir/tounicode.c @@ -535,10 +535,17 @@ void undumptounicode(void) void **result; glyph_unicode_entry *gu = new_glyph_unicode_entry(); undumpcharptr(gu->name); + if (gu->name == NULL) { + pdftex_fail("undumpcharptr(gu->name) got NULL"); + } generic_undump(gu->code); - if (gu->code == UNI_STRING) + if (gu->code == UNI_STRING) { undumpcharptr(gu->unicode_seq); + if (gu->unicode_seq == NULL) { + pdftex_fail("undumpcharptr(gu->unicode_seq) got NULL"); + } + } result = avl_probe(glyph_unicode_tree, gu); assert(*result == gu); |