From c8201b3e2e25ed926de8a2f47e5d11fce62dc9b5 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 16 Mar 2021 21:48:02 +0000 Subject: error message instead of assertion git-svn-id: svn://tug.org/texlive/trunk@58431 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/pdftexdir/ChangeLog | 5 +++++ Build/source/texk/web2c/pdftexdir/writefont.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index b7423541d95..91250e3fb29 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,8 @@ +2021-03-16 Karl Berry + + * writefont.c (write_fontdictionary): pdftex_fail with message + instead of assertion. From Martin Budaj, Mar 16, 2021 at 8:47 AM. + 2021-02-22 Phelype Oleinik * pdftex.web: avoid "expansion depth" overflow with \numexpr. diff --git a/Build/source/texk/web2c/pdftexdir/writefont.c b/Build/source/texk/web2c/pdftexdir/writefont.c index ec073e0edff..5f67a348bae 100644 --- a/Build/source/texk/web2c/pdftexdir/writefont.c +++ b/Build/source/texk/web2c/pdftexdir/writefont.c @@ -1,5 +1,5 @@ /* writefont.c: font descriptors and writing Type 1 fonts. -Copyright 1996-2018 Han The Thanh, +Copyright 1996-2021 Han The Thanh, This file is part of pdfTeX. @@ -552,7 +552,9 @@ static void write_fontdictionary(fo_entry * fo) fo->tounicode_objnum = write_tounicode(fo->fe->glyph_names, fo->fm->tfm_name, fo->fe->name); } else if (is_type1(fo->fm)) { - assert(fo->fd->builtin_glyph_names != NULL); + if (fo->fd->builtin_glyph_names==NULL) { + pdftex_fail("builtin glyph names is empty"); + } fo->tounicode_objnum = write_tounicode(fo->fd->builtin_glyph_names, fo->fm->tfm_name, NULL); } -- cgit v1.2.3