]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Issue 219: 'size' variable should be signed, to detect overflow.
authorTim Kientzle <kientzle@gmail.com>
Wed, 4 Jan 2012 03:21:54 +0000 (22:21 -0500)
committerTim Kientzle <kientzle@gmail.com>
Wed, 4 Jan 2012 03:21:54 +0000 (22:21 -0500)
SVN-Revision: 4077

libarchive/test/read_open_memory.c

index 49cb8858283a6d2b0535df63f2d6a329bfee7e91..e787f0fc6eb36884553a9a8d111be2d2cc1e32b7 100644 (file)
@@ -137,7 +137,7 @@ static ssize_t
 memory_read(struct archive *a, void *client_data, const void **buff)
 {
        struct read_memory_data *mine = (struct read_memory_data *)client_data;
-       size_t size;
+       ssize_t size;
 
        (void)a; /* UNUSED */
        size = mine->end - mine->p;