diff options
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.patch | 56 |
1 files changed, 56 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..e36429ad5b --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_6.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From ea9aafc41a764e4e2dbb88a7b031e886b481b99a Mon Sep 17 00:00:00 2001 | ||
2 | From: Alan Modra <amodra@gmail.com> | ||
3 | Date: Tue, 27 Jun 2017 14:43:49 +0930 | ||
4 | Subject: [PATCH] Warning fix | ||
5 | |||
6 | PR binutils/21665 | ||
7 | * libbfd.c (_bfd_generic_get_section_contents): Warning fix. | ||
8 | (_bfd_generic_get_section_contents_in_window): Likewise. | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | CVE: CVE-2017-9955 #6 | ||
12 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
13 | |||
14 | --- | ||
15 | bfd/ChangeLog | 12 +++++++++--- | ||
16 | bfd/libbfd.c | 4 ++-- | ||
17 | 2 files changed, 11 insertions(+), 5 deletions(-) | ||
18 | |||
19 | Index: git/bfd/libbfd.c | ||
20 | =================================================================== | ||
21 | --- git.orig/bfd/libbfd.c | ||
22 | +++ git/bfd/libbfd.c | ||
23 | @@ -806,7 +806,7 @@ _bfd_generic_get_section_contents (bfd * | ||
24 | filesz = bfd_get_file_size (abfd); | ||
25 | if (offset + count < count | ||
26 | || offset + count > sz | ||
27 | - || section->filepos + offset + count > filesz) | ||
28 | + || (ufile_ptr) section->filepos + offset + count > filesz) | ||
29 | { | ||
30 | bfd_set_error (bfd_error_invalid_operation); | ||
31 | return FALSE; | ||
32 | @@ -864,7 +864,7 @@ _bfd_generic_get_section_contents_in_win | ||
33 | sz = section->size; | ||
34 | filesz = bfd_get_file_size (abfd); | ||
35 | if (offset + count > sz | ||
36 | - || section->filepos + offset + count > filesz | ||
37 | + || (ufile_ptr) section->filepos + offset + count > filesz | ||
38 | || ! bfd_get_file_window (abfd, section->filepos + offset, count, w, | ||
39 | TRUE)) | ||
40 | return FALSE; | ||
41 | Index: git/bfd/ChangeLog | ||
42 | =================================================================== | ||
43 | --- git.orig/bfd/ChangeLog | ||
44 | +++ git/bfd/ChangeLog | ||
45 | @@ -1,5 +1,11 @@ | ||
46 | 2017-06-27 Alan Modra <amodra@gmail.com> | ||
47 | |||
48 | + PR binutils/21665 | ||
49 | + * libbfd.c (_bfd_generic_get_section_contents): Warning fix. | ||
50 | + (_bfd_generic_get_section_contents_in_window): Likewise. | ||
51 | + | ||
52 | +2017-06-27 Alan Modra <amodra@gmail.com> | ||
53 | + | ||
54 | PR binutils/21665 | ||
55 | * libbfd.c (_bfd_generic_get_section_contents): Delete abort. | ||
56 | Use unsigned file pointer type, and remove cast. | ||