diff options
author | Thomas Freitag <Thomas.Freitag@alfa.de> | 2012-09-09 22:22:59 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2012-09-09 22:22:59 +0200 |
commit | e6a3c797c01aa343f640f2e6f45de5bf379aa8ad (patch) | |
tree | 75615c0428c3778f3ec449db423642c7e90dc326 | |
parent | 48fe18cf277cd2a4e665c74b3a594482f762f4b6 (diff) |
Fix wrong memory access in 68.pdf.asan.7.1030
-rw-r--r-- | poppler/Gfx.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc index ffe74864..661ec3d9 100644 --- a/poppler/Gfx.cc +++ b/poppler/Gfx.cc @@ -1671,6 +1671,10 @@ void Gfx::opSetStrokeColorN(Object args[], int numArgs) { state->setStrokeColor(&color); out->updateStrokeColor(state); } + if (numArgs <= 0) { + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SCN' command"); + return; + } if (args[numArgs-1].isName() && (pattern = res->lookupPattern(args[numArgs-1].getName(), this))) { state->setStrokePattern(pattern); |