summaryrefslogtreecommitdiff
path: root/libspectre
diff options
context:
space:
mode:
authorRandy <randy408@protonmail.com>2020-03-03 08:33:22 +0000
committerAlbert Astals Cid <tsdgeos@yahoo.es>2020-03-03 08:33:22 +0000
commit3bff18aa496ff00b9ddd127c83241a4399850ef0 (patch)
tree781e4b95e384dbbf1956dc7ad984d1cc2a476ff7 /libspectre
parent79741b6e1b8abdcb7366d4f35d9bfa041854bfab (diff)
fix NULL-dereference in psscan()
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20986
Diffstat (limited to 'libspectre')
-rw-r--r--libspectre/ps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libspectre/ps.c b/libspectre/ps.c
index 678aa7f..f0432aa 100644
--- a/libspectre/ps.c
+++ b/libspectre/ps.c
@@ -1073,7 +1073,7 @@ continuepage:
* name. Case insensitive compares are only used for
* PaperSize comments.
*/
- if (_spectre_strcasecmp(cp, dmp->name) == 0) {
+ if (cp && _spectre_strcasecmp(cp, dmp->name) == 0) {
doc->pages[doc->numpages].media = dmp;
break;
}