summaryrefslogtreecommitdiff
path: root/packages/zziplib/files/zip_c.patch
blob: fb23ce650e8a556322106eded2d4a9c3f1fa481b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
From zziplib Debian source package
--- a/zzip/zip.c	2007-03-19 02:27:49.000000000 +1100
+++ b/zzip/zip.c	2007-11-07 17:40:52.985849197 +1100
@@ -402,7 +402,10 @@
         uint16_t u_extras, u_comment, u_namlen;
 
         if (fd_map) 
-	{ d = (void*)(fd_map+zz_fd_gap+zz_offset); } /* fd_map+fd_gap==u_rootseek */
+        {
+             d = &dirent;
+             memcpy(d, fd_map+zz_fd_gap+zz_offset, sizeof(*d)); /* fd_map+fd_gap==u_rootseek */
+        }
         else
         {
             if (io->fd.seeks(fd, zz_rootseek+zz_offset, SEEK_SET) < 0)