File: CVE-2021-23165.patch

package info (click to toggle)
htmldoc 1.9.3-1%2Bdeb10u4
  • links: PTS
  • area: main
  • in suites: buster
  • size: 15,224 kB
  • sloc: ansic: 67,846; cpp: 24,380; makefile: 352; sh: 149; java: 59; php: 36; xml: 10; perl: 7
file content (24 lines) | stat: -rw-r--r-- 768 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Michael R Sweet <michael.r.sweet@gmail.com>
Date: Thu, 1 Apr 2021 09:47:56 -0400
Subject: CVE-2021-23165

Fix a number-up crash bug (Issue #413)

Origin: upstream, https://github.com/michaelrsweet/htmldoc/commit/6e8a95561988500b5b5ae4861b3b0cbf4fba517f
Bug: https://github.com/michaelrsweet/htmldoc/issues/413
Bug-Debian: https://bugs.debian.org/989437
---
 htmldoc/ps-pdf.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/htmldoc/ps-pdf.cxx
+++ b/htmldoc/ps-pdf.cxx
@@ -1283,7 +1283,7 @@
     chapter_outstarts[c] = num_outpages;
 
     for (i = chapter_starts[c], j = 0, nup = -1, page = pages + i;
-         i <= chapter_ends[c];
+         i <= chapter_ends[c] && num_outpages < num_pages;
 	 i ++, page ++)
     {
       if (nup != page->nup)