X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=inline;f=backend%2Fdvi%2Fmdvi-lib%2Fdviread.c;h=d01432056518ac6ae3518ed3eec5f5705159f02f;hb=ab0edaffd2f1790ec8ac7ac17f90e0a8007b92cd;hp=cd8cfa916113e821e87c344de300ba998a8b95a5;hpb=d6a02d14c7ae7e3f3a01d2d025324889bedf2275;p=evince.git diff --git a/backend/dvi/mdvi-lib/dviread.c b/backend/dvi/mdvi-lib/dviread.c index cd8cfa91..d0143205 100644 --- a/backend/dvi/mdvi-lib/dviread.c +++ b/backend/dvi/mdvi-lib/dviread.c @@ -1507,6 +1507,10 @@ int special(DviContext *dvi, int opcode) Int32 arg; arg = dugetn(dvi, opcode - DVI_XXX1 + 1); + if (arg <= 0) { + dvierr(dvi, _("malformed special length\n")); + return -1; + } s = mdvi_malloc(arg + 1); dread(dvi, s, arg); s[arg] = 0;