projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f66d6be
)
compiler: Don't overwrite memory if an archive has a bad file name.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 30 Apr 2014 02:38:30 +0000
(
02:38
+0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Wed, 30 Apr 2014 02:38:30 +0000
(
02:38
+0000)
From-SVN: r209924
gcc/go/gofrontend/import-archive.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/import-archive.cc
b/gcc/go/gofrontend/import-archive.cc
index
9a1d5b3
..
34fb528
100644
(file)
--- a/
gcc/go/gofrontend/import-archive.cc
+++ b/
gcc/go/gofrontend/import-archive.cc
@@
-261,7
+261,7
@@
Archive_file::interpret_header(const Archive_header* hdr, off_t off,
char size_string[size_string_size + 1];
memcpy(size_string, hdr->ar_size, size_string_size);
char* ps = size_string + size_string_size;
- while (ps[-1] == ' ')
+ while (ps
> size_string && ps
[-1] == ' ')
--ps;
*ps = '\0';