2007-05-07 14:30:01 +02:00
|
|
|
archival/libunarchive/get_header_tar.c: In function 'get_header_tar':
|
|
|
|
archival/libunarchive/get_header_tar.c:140: warning: array subscript is above array bounds
|
|
|
|
archival/libunarchive/get_header_tar.c:155: warning: array subscript is above array bounds
|
|
|
|
archival/libunarchive/get_header_tar.c:158: warning: array subscript is above array bounds
|
|
|
|
make[1]: *** [archival/libunarchive/get_header_tar.o] Error 1
|
|
|
|
|
|
|
|
---
|
|
|
|
archival/libunarchive/get_header_tar.c | 12 ++++++------
|
|
|
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
|
2007-07-16 07:36:25 +02:00
|
|
|
--- a/archival/libunarchive/get_header_tar.c
|
|
|
|
+++ b/archival/libunarchive/get_header_tar.c
|
2007-11-19 10:18:53 +01:00
|
|
|
@@ -162,8 +162,8 @@ char get_header_tar(archive_handle_t *ar
|
2007-05-07 14:30:01 +02:00
|
|
|
}
|
2007-11-19 10:18:53 +01:00
|
|
|
file_header->link_target = NULL;
|
2007-05-07 14:30:01 +02:00
|
|
|
if (!linkname && parse_names && tar.linkname[0]) {
|
|
|
|
- /* we trash magic[0] here, it's ok */
|
|
|
|
- tar.linkname[sizeof(tar.linkname)] = '\0';
|
|
|
|
+ /* we trash magic[0] here to terminate tar.linkname, it's ok */
|
|
|
|
+ tar.magic[0] = '\0';
|
2007-11-19 10:18:53 +01:00
|
|
|
file_header->link_target = xstrdup(tar.linkname);
|
|
|
|
/* FIXME: what if we have non-link object with link_target? */
|
|
|
|
/* Will link_target be free()ed? */
|
|
|
|
@@ -177,11 +177,11 @@ char get_header_tar(archive_handle_t *ar
|
2007-05-07 14:30:01 +02:00
|
|
|
|
|
|
|
file_header->name = NULL;
|
|
|
|
if (!longname && parse_names) {
|
|
|
|
- /* we trash mode[0] here, it's ok */
|
|
|
|
- tar.name[sizeof(tar.name)] = '\0';
|
|
|
|
+ /* we trash mode[0] here to terminate tar.name, it's ok */
|
|
|
|
+ tar.mode[0] = '\0';
|
|
|
|
if (tar.prefix[0]) {
|
|
|
|
- /* and padding[0] */
|
|
|
|
- tar.prefix[sizeof(tar.prefix)] = '\0';
|
|
|
|
+ /* and padding[0] to terminate tar.prefix */
|
|
|
|
+ tar.padding[0] = '\0';
|
|
|
|
file_header->name = concat_path_file(tar.prefix, tar.name);
|
|
|
|
} else
|
|
|
|
file_header->name = xstrdup(tar.name);
|