summaryrefslogtreecommitdiff
path: root/libspectre
diff options
context:
space:
mode:
authorRandy <randy408@protonmail.com>2020-03-07 10:11:03 +0100
committerRandy <randy408@protonmail.com>2020-03-07 10:19:27 +0100
commitebc0c1ef2e36cb50267689cc44338a17d2895725 (patch)
tree4ce5e455af49b2ca050ac3c88ca001a3111a8287 /libspectre
parent3bff18aa496ff00b9ddd127c83241a4399850ef0 (diff)
fix NULL-dereference in psscan.c:934
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 f0432aa..cd27694 100644
--- a/libspectre/ps.c
+++ b/libspectre/ps.c
@@ -931,7 +931,7 @@ psscan(FILE *file, const char *filename, int scanstyle)
* 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->default_page_media = dmp;
page_media_set = 1;
break;