[gs-commits] mupdf 1.16.1.33 Fix boundary check of fallback font array

[email protected] (Sebastian Rasmussen)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
commit 177d7124f342e99d1273593ca04e0c9618633a30
Author: Sebastian Rasmussen <[email protected]>
Date:   Thu Sep 5 19:42:47 2019 +0200

    Fix boundary check of fallback font array.
    
    This fixes Coverity CID 77146.

diff --git a/source/fitz/font.c b/source/fitz/font.c
index a740a51..592d56c 100644
--- a/source/fitz/font.c
+++ b/source/fitz/font.c
@@ -524,7 +524,7 @@ fz_font *fz_load_fallback_font(fz_context *ctx, int script, int language, int se
 	int subfont;
 	int size;
 
-	if (script < 0 || script > nelem(ctx->font->fallback))
+	if (script < 0 || script >= nelem(ctx->font->fallback))
 		return NULL;
 
 	/* TODO: bold and italic */

http://git.ghostscript.com/?p=mupdf.git;a=commit;h=177d7124f342e99d1273593ca04e0c9618633a30

--
MuPDF library
Artifex Software, Inc.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.