mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-28 23:21:16 +08:00
re PR java/7830 (Off-by-one buffer overruns in fastjar tool)
From greenrd@hotmail.com: * jartool.c (list_jar): Correctly determine when new `filename' buffer must be allocated. Fixes PR java/7830. From-SVN: r56818
This commit is contained in:
parent
29984e05ae
commit
a038cc83d6
@ -1,3 +1,9 @@
|
||||
2002-09-04 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
From greenrd@hotmail.com:
|
||||
* jartool.c (list_jar): Correctly determine when new `filename'
|
||||
buffer must be allocated. Fixes PR java/7830.
|
||||
|
||||
2002-06-03 Geoffrey Keating <geoffk@redhat.com>
|
||||
|
||||
* configure.in: Support cross-compiling.
|
||||
|
@ -1657,7 +1657,7 @@ int list_jar(int fd, char **files, int file_num){
|
||||
strftime(ascii_date, 30, "%a %b %d %H:%M:%S %Z %Y", s_tm);
|
||||
}
|
||||
|
||||
if(filename_len < fnlen){
|
||||
if(filename_len < fnlen + 1){
|
||||
if(filename != NULL)
|
||||
free(filename);
|
||||
|
||||
@ -1776,7 +1776,7 @@ int list_jar(int fd, char **files, int file_num){
|
||||
strftime(ascii_date, 30, "%a %b %d %H:%M:%S %Z %Y", s_tm);
|
||||
}
|
||||
|
||||
if(filename_len < fnlen){
|
||||
if(filename_len < fnlen + 1){
|
||||
if(filename != NULL)
|
||||
free(filename);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user