]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Make sure a check of a filename in joliet extension does not access
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Fri, 17 Dec 2010 04:27:08 +0000 (23:27 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Fri, 17 Dec 2010 04:27:08 +0000 (23:27 -0500)
invalid address.

SVN-Revision: 2829

libarchive/archive_read_support_format_iso9660.c

index 714f5271b7c83bc7f908c47fb6e40d51dfa6a0df..efc2d4e15a366a65fc81bc152eaea6dc6780d72d 100644 (file)
@@ -1785,7 +1785,7 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
                 *       *, /, :, ;, ? and \.
                 */
                /* Chop off trailing ';1' from files. */
-               if (*(wp-2) == L';' && *(wp-1) == L'1') {
+               if (wp > (wbuff + 2) && *(wp-2) == L';' && *(wp-1) == L'1') {
                        wp-=2;
                        *wp = L'\0';
                }