blob: 55feb79c17f303d656864fe8a5dcca46ffba107c (
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
|
commit ea9aafc41a764e4e2dbb88a7b031e886b481b99a
Author: Alan Modra <amodra@gmail.com>
Date: Tue Jun 27 14:43:49 2017 +0930
Warning fix
PR binutils/21665
* libbfd.c (_bfd_generic_get_section_contents): Warning fix.
(_bfd_generic_get_section_contents_in_window): Likewise.
Upstream-Status: Backport
CVE: CVE-2017-9955
Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>
Index: git/bfd/libbfd.c
===================================================================
--- git.orig/bfd/libbfd.c 2017-09-21 18:07:34.777651818 +0530
+++ git/bfd/libbfd.c 2017-09-21 18:07:34.761651695 +0530
@@ -805,7 +805,7 @@
filesz = bfd_get_file_size (abfd);
if (offset + count < count
|| offset + count > sz
- || section->filepos + offset + count > filesz)
+ || (ufile_ptr) section->filepos + offset + count > filesz)
{
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
@@ -863,7 +863,7 @@
sz = section->size;
filesz = bfd_get_file_size (abfd);
if (offset + count > sz
- || section->filepos + offset + count > filesz
+ || (ufile_ptr) section->filepos + offset + count > filesz
|| ! bfd_get_file_window (abfd, section->filepos + offset, count, w,
TRUE))
return FALSE;
Index: git/bfd/ChangeLog
===================================================================
--- git.orig/bfd/ChangeLog 2017-09-21 18:06:39.973228125 +0530
+++ git/bfd/ChangeLog 2017-09-21 18:09:41.798640031 +0530
@@ -19,6 +19,12 @@
* libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
Add "count", not "sz".
+2017-06-27 Alan Modra <amodra@gmail.com>
+
+ PR binutils/21665
+ * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
+ (_bfd_generic_get_section_contents_in_window): Likewise.
+
2017-06-26 Pedro Alves <palves@redhat.com>
PR binutils/21665
|