components/libarchive/patches/archive_write_set_format_zip.c.patch
changeset 4997 714545171c17
parent 4995 ecffc6614cfa
child 5000 ba06ad809495
equal deleted inserted replaced
4995:ecffc6614cfa 4997:714545171c17
     1 This patch was fed back to the upstream community:
       
     2 http://code.google.com/p/libarchive/issues/detail?id=286
       
     3 Given the response "I applied your patch to zip writer."
       
     4 it should no longer be needed with the next release.
       
     5 
       
     6 --- libarchive/libarchive/archive_write_set_format_zip.c.orig	Mon Mar 26 19:49:00 2012
       
     7 +++ libarchive/libarchive/archive_write_set_format_zip.c	Tue Nov 27 17:31:42 2012
       
     8 @@ -842,6 +842,8 @@
       
     9  	type = archive_entry_filetype(entry);
       
    10  	path = archive_entry_pathname(entry);
       
    11  
       
    12 +	if (path == NULL)
       
    13 +		return (0);
       
    14  	if ((type == AE_IFDIR) & (path[strlen(path) - 1] != '/')) {
       
    15  		return strlen(path) + 1;
       
    16  	} else {