/[gentoo-x86]/app-arch/zip/files/zip-3.0-zipnote-freeze.patch
Gentoo

Contents of /app-arch/zip/files/zip-3.0-zipnote-freeze.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Wed Jan 28 09:45:40 2015 UTC (5 years, 6 months ago) by chainsaw
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-diff
Upstream 3.1C fileio & zipnote changes backported by Rafał "galtgendo" Mużyło, closes bug #322047. Incorrect printf usage changed to fputs by Ted Tanberry, closes bug #512414.

(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 0xB5058F9A)

1 diff -dupr zip30-old/fileio.c zip30/fileio.c
2 --- zip30-old/fileio.c 2008-05-28 20:13:24.000000000 +0200
3 +++ zip30/fileio.c 2012-06-12 17:30:29.794547493 +0200
4 @@ -3502,7 +3502,7 @@ zwchar *local_to_wide_string(local_strin
5 if ((wc_string = (wchar_t *)malloc((wsize + 1) * sizeof(wchar_t))) == NULL) {
6 ZIPERR(ZE_MEM, "local_to_wide_string");
7 }
8 - wsize = mbstowcs(wc_string, local_string, strlen(local_string) + 1);
9 + wsize = mbstowcs(wc_string, local_string, wsize + 1);
10 wc_string[wsize] = (wchar_t) 0;
11
12 /* in case wchar_t is not zwchar */
13 diff -dupr zip30-old/zipfile.c zip30/zipfile.c
14 --- zip30/zipfile.c 2008-07-01 00:15:30.000000000 +0200
15 +++ zip30/zipfile.c 2012-06-10 01:59:42.571706181 +0200
16 @@ -5406,6 +5406,8 @@ int putlocal(z, rewrite)
17 if (z->flg & UTF8_BIT) {
18 /* If this flag is set, then restore UTF-8 as path name */
19 use_uname = 1;
20 + tempzn -= nam;
21 nam = strlen(z->uname);
22 + tempzn += nam;
23 } else {
24 /* use extra field */
25 add_Unicode_Path_local_extra_field(z);
26 @@ -5647,7 +5650,9 @@ int putcentral(z)
27 if (z->flg & UTF8_BIT) {
28 /* If this flag is set, then restore UTF-8 as path name */
29 use_uname = 1;
30 + tempzn -= nam;
31 nam = strlen(z->uname);
32 + tempzn += nam;
33 } else {
34 add_Unicode_Path_cen_extra_field(z);
35 }
36 diff -dupr zip30/zipnote.c zip30/zipnote.c
37 --- zip30/zipnote.c 2008-05-08 04:17:08.000000000 +0200
38 +++ zip30/zipnote.c 2012-06-10 02:33:36.372663528 +0200
39 @@ -575,6 +575,13 @@ char **argv; /* command line
40 strcpy(z->iname, a+2);
41 #endif
42
43 +#ifdef UNICODE_SUPPORT
44 +#define UTF8_BIT (1 << 11)
45 + if (using_utf8) {
46 + z->uname = z->iname;
47 + }
48 +#endif
49 +
50 /*
51 * Don't update z->nam here, we need the old value a little later.....
52 * The update is handled in zipcopy().
53 @@ -661,7 +668,7 @@ char **argv; /* command line
54 if ((r = zipcopy(z)) != ZE_OK)
55 ziperr(r, "was copying an entry");
56 }
57 - fclose(x);
58 + fclose(in_file);
59
60 /* Write central directory and end of central directory with new comments */
61 if ((c = zftello(y)) == (zoff_t)-1) /* get start of central */

  ViewVC Help
Powered by ViewVC 1.1.20