aboutsummaryrefslogtreecommitdiffstats
path: root/main/mupdf/CVE-2017-6060.patch
blob: cc03f6106b81c03de9136f1d428a7c8b7fd6b9fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
squashed commits:
06a012a42c9884e3cd653e7826cff1ddec04eb6e
e089b2e2c1d38c5696c7dfd741e21f8f3ef22b14

From 05cb7595b61aa00a29f1609b75d280b589091356 Mon Sep 17 00:00:00 2001
From: Sebastian Rasmussen <sebras@gmail.com>
Date: Tue, 11 Apr 2017 10:54:12 +0800
Subject: [PATCH] Bug 697551: Make path and line buffers of equal size.

Previously a too long line could be copied into the too short path buffer.

jstest: Stop printing bogus script lines.
---
 platform/x11/jstest_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/platform/x11/jstest_main.c b/platform/x11/jstest_main.c
index 13c3a0a3..36b32155 100644
--- a/platform/x11/jstest_main.c
+++ b/platform/x11/jstest_main.c
@@ -346,7 +346,7 @@ main(int argc, char *argv[])
 				}
 				else if (match(&line, "OPEN"))
 				{
-					char path[1024];
+					char path[LONGLINE];
 					if (file_open)
 						pdfapp_close(&gapp);
 					if (prefix)
@@ -402,7 +402,7 @@ main(int argc, char *argv[])
 				}
 				else
 				{
-					fprintf(stderr, "Unmatched: %s\n", line);
+					fprintf(stderr, "Ignoring line without script statement.\n");
 				}
 			}
 			while (!feof(script));
-- 
2.12.2