diff options
Diffstat (limited to 'backend/dvi/mdvi-lib/dviread.c')
-rw-r--r-- | backend/dvi/mdvi-lib/dviread.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |