texlive/source-CVE-2023-46051.patch

26 lines
877 B
Diff
Raw Normal View History

---
texk/web2c/pdftexdir/tounicode.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--- texk/web2c/pdftexdir/tounicode.c
+++ texk/web2c/pdftexdir/tounicode.c 2024-04-02 00:00:00.000000000 +0000
@@ -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);