projects
/
mupdf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dca29b5
)
source/fitz/output-pdfocr.c: added assert for no division-by-zero.
author
Julian Smith
<
[email protected]
>
Sat, 15 Oct 2022 10:09:06 +0000
(11:09 +0100)
committer
Julian Smith
<
[email protected]
>
Mon, 17 Oct 2022 12:08:51 +0000
(13:08 +0100)
source/fitz/output-pdfocr.c
patch
|
blob
|
blame
|
history
diff --git
a/source/fitz/output-pdfocr.c
b/source/fitz/output-pdfocr.c
index 6afb4c804d65148c9bc0daf676df938b9c67cd87..eb4999a260b628c7d0f98eedf06d358c95e3b614 100644
(file)
--- a/
source/fitz/output-pdfocr.c
+++ b/
source/fitz/output-pdfocr.c
@@
-22,6
+22,7
@@
#include "mupdf/fitz.h"
+#include <assert.h>
#include <string.h>
#include <limits.h>
@@
-272,6
+273,7
@@
pdfocr_write_header(fz_context *ctx, fz_band_writer *writer_, fz_colorspace *cs)
if (sh == 0)
sh = h;
+ assert(sh != 0 && "pdfocr_write_header() should not be given zero height input.");
strips = (h + sh-1)/sh;
if (a != 0)