diff options
-rw-r--r-- | pdf/pdf_fmap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pdf/pdf_fmap.c b/pdf/pdf_fmap.c index a33b53884..0d3bc8e36 100644 --- a/pdf/pdf_fmap.c +++ b/pdf/pdf_fmap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2020-2022 Artifex Software, Inc. +/* Copyright (C) 2020-2023 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -677,6 +677,8 @@ static int pdfi_generate_native_fontmap(pdf_context *ctx) continue; sf = sfopen(result, "r", ctx->memory); + if (sf == NULL) + continue; code = sgets(sf, magic, 4, &nread); if (code < 0 || nread < 4) { sfclose(sf); |