blob: 68edca4d061a89f194f0a840b8cefb5e7f1adaab (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
From 053ec2207203a194d2ae82e2f164009aad3f14d2 Mon Sep 17 00:00:00 2001
From: bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 8 Apr 2016 12:06:59 +0000
Subject: [PATCH] =?UTF-8?q?Handle=20an=20overflow=20case=20(PR70498,=20pat?=
=?UTF-8?q?ch=20by=20Marcel=20B=C3=B6hme).?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
PR c++/70498
* cplus-dem.c (gnu_special): Handle case where consume_count returns
-1.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234828 138bc75d-0d04-0410-961f-82ee72b054a4
Upstream-Status: Backport
CVE: CVE-2016-4489
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
libiberty/ChangeLog | 6 ++++++
libiberty/cplus-dem.c | 5 +++++
2 files changed, 11 insertions(+)
Index: gcc-5.2.0/libiberty/ChangeLog
===================================================================
--- gcc-5.2.0.orig/libiberty/ChangeLog
+++ gcc-5.2.0/libiberty/ChangeLog
@@ -1,3 +1,9 @@
+2016-04-08 Marcel Böhme <boehme.marcel@gmail.com>
+
+ PR c++/70498
+ * cplus-dem.c (gnu_special): Handle case where consume_count returns
+ -1.
+
2016-03-31 Mikhail Maltsev <maltsevm@gmail.com>
Marcel Bohme boehme.marcel@gmail.com
Index: gcc-5.2.0/libiberty/cplus-dem.c
===================================================================
--- gcc-5.2.0.orig/libiberty/cplus-dem.c
+++ gcc-5.2.0/libiberty/cplus-dem.c
@@ -3001,6 +3001,11 @@ gnu_special (struct work_stuff *work, co
success = 1;
break;
}
+ else if (n == -1)
+ {
+ success = 0;
+ break;
+ }
}
else
{
|