summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch b/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch
new file mode 100644
index 0000000000..55feb79c17
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch
@@ -0,0 +1,55 @@
1commit ea9aafc41a764e4e2dbb88a7b031e886b481b99a
2Author: Alan Modra <amodra@gmail.com>
3Date: Tue Jun 27 14:43:49 2017 +0930
4
5 Warning fix
6
7 PR binutils/21665
8 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
9 (_bfd_generic_get_section_contents_in_window): Likewise.
10
11Upstream-Status: Backport
12
13CVE: CVE-2017-9955
14Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
15
16
17Index: git/bfd/libbfd.c
18===================================================================
19--- git.orig/bfd/libbfd.c 2017-09-21 18:07:34.777651818 +0530
20+++ git/bfd/libbfd.c 2017-09-21 18:07:34.761651695 +0530
21@@ -805,7 +805,7 @@
22 filesz = bfd_get_file_size (abfd);
23 if (offset + count < count
24 || offset + count > sz
25- || section->filepos + offset + count > filesz)
26+ || (ufile_ptr) section->filepos + offset + count > filesz)
27 {
28 bfd_set_error (bfd_error_invalid_operation);
29 return FALSE;
30@@ -863,7 +863,7 @@
31 sz = section->size;
32 filesz = bfd_get_file_size (abfd);
33 if (offset + count > sz
34- || section->filepos + offset + count > filesz
35+ || (ufile_ptr) section->filepos + offset + count > filesz
36 || ! bfd_get_file_window (abfd, section->filepos + offset, count, w,
37 TRUE))
38 return FALSE;
39Index: git/bfd/ChangeLog
40===================================================================
41--- git.orig/bfd/ChangeLog 2017-09-21 18:06:39.973228125 +0530
42+++ git/bfd/ChangeLog 2017-09-21 18:09:41.798640031 +0530
43@@ -19,6 +19,12 @@
44 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
45 Add "count", not "sz".
46
47+2017-06-27 Alan Modra <amodra@gmail.com>
48+
49+ PR binutils/21665
50+ * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
51+ (_bfd_generic_get_section_contents_in_window): Likewise.
52+
53 2017-06-26 Pedro Alves <palves@redhat.com>
54
55 PR binutils/21665