diff options
author | Igor Pashev <igor.pashev@nexenta.com> | 2012-12-03 19:01:30 +0400 |
---|---|---|
committer | Igor Pashev <igor.pashev@nexenta.com> | 2012-12-03 19:01:30 +0400 |
commit | 8ce8d223a716e16cd3ffd3aaa04d4dee7d35d4dd (patch) | |
tree | df24ae9285d42b32bf3f9b74e0142a4e36b6f5f0 /binutils/patches/pr13534-03.diff | |
parent | 7a067c659745b5cd1cc33767cc4d554b40885a5c (diff) | |
download | cibs-pkgs-8ce8d223a716e16cd3ffd3aaa04d4dee7d35d4dd.tar.gz |
GNU binutils 2.22+
Diffstat (limited to 'binutils/patches/pr13534-03.diff')
-rw-r--r-- | binutils/patches/pr13534-03.diff | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/binutils/patches/pr13534-03.diff b/binutils/patches/pr13534-03.diff new file mode 100644 index 0000000..454ccae --- /dev/null +++ b/binutils/patches/pr13534-03.diff @@ -0,0 +1,29 @@ +commit 23a979dc1779ac63cd799bfa2f6c2aed1f1bff66 +Author: Francois Gouget <fgouget@codeweavers.com> +Date: Tue Dec 20 18:41:35 2011 +0100 + + bfd: Fix parsing the size of archive elements larger than 2GB. + +diff --git a/bfd/archive.c b/bfd/archive.c +index 05aba6c..01acf98 100644 +--- a/bfd/archive.c ++++ b/bfd/archive.c +@@ -446,7 +446,7 @@ _bfd_generic_read_ar_hdr_mag (bfd *abfd, const char *mag) + { + struct ar_hdr hdr; + char *hdrp = (char *) &hdr; +- size_t parsed_size; ++ bfd_size_type parsed_size; + struct areltdata *ared; + char *filename = NULL; + bfd_size_type namelen = 0; +@@ -470,8 +470,7 @@ _bfd_generic_read_ar_hdr_mag (bfd *abfd, const char *mag) + } + + errno = 0; +- parsed_size = strtol (hdr.ar_size, NULL, 10); +- if (errno != 0) ++ if (sscanf(hdr.ar_size, "%" BFD_VMA_FMT "u", &parsed_size) != 1) + { + bfd_set_error (bfd_error_malformed_archive); + return NULL; |