X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Fdvi%2Fmdvi-lib%2Fvf.c;h=a5ae3bbe721a162c7f486eddca85c08fccac2893;hb=7aebdb8f5f4a4f44181590befdde27aac11a1e9a;hp=3826ae878f54160cc03f0b94c0c0b8ab5a116bc7;hpb=14def5e0c1c11cee1523e10c72df74f4cf5e451d;p=evince.git diff --git a/backend/dvi/mdvi-lib/vf.c b/backend/dvi/mdvi-lib/vf.c index 3826ae87..a5ae3bbe 100644 --- a/backend/dvi/mdvi-lib/vf.c +++ b/backend/dvi/mdvi-lib/vf.c @@ -14,7 +14,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include @@ -165,6 +165,12 @@ static int vf_load_font(DviParams *params, DviFont *font) cc = fuget1(p); tfm = fuget3(p); } + if (cc < 0 || cc > 65536) { + /* TeX engines do not support char codes bigger than 65535 */ + mdvi_error(_("(vf) %s: unexpected character %d\n"), + font->fontname, cc); + goto error; + } if(loc < 0 || cc < loc) loc = cc; if(hic < 0 || cc > hic)