Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 322047
Collapse All | Expand All

(-)zip30-old/fileio.c (-1 / +1 lines)
Lines 3502-3508 zwchar *local_to_wide_string(local_strin Link Here
3502
  if ((wc_string = (wchar_t *)malloc((wsize + 1) * sizeof(wchar_t))) == NULL) {
3502
  if ((wc_string = (wchar_t *)malloc((wsize + 1) * sizeof(wchar_t))) == NULL) {
3503
    ZIPERR(ZE_MEM, "local_to_wide_string");
3503
    ZIPERR(ZE_MEM, "local_to_wide_string");
3504
  }
3504
  }
3505
  wsize = mbstowcs(wc_string, local_string, strlen(local_string) + 1);
3505
  wsize = mbstowcs(wc_string, local_string, wsize + 1);
3506
  wc_string[wsize] = (wchar_t) 0;
3506
  wc_string[wsize] = (wchar_t) 0;
3507
3507
3508
  /* in case wchar_t is not zwchar */
3508
  /* in case wchar_t is not zwchar */
(-)zip30/zipfile.c (+4 lines)
Lines 5406-5411 int putlocal(z, rewrite) Link Here
5406
    if (z->flg & UTF8_BIT) {
5406
    if (z->flg & UTF8_BIT) {
5407
      /* If this flag is set, then restore UTF-8 as path name */
5407
      /* If this flag is set, then restore UTF-8 as path name */
5408
      use_uname = 1;
5408
      use_uname = 1;
5409
      tempzn -= nam;
5409
      nam = strlen(z->uname);
5410
      nam = strlen(z->uname);
5411
      tempzn += nam;
5410
    } else {
5412
    } else {
5411
      /* use extra field */
5413
      /* use extra field */
5412
      add_Unicode_Path_local_extra_field(z);
5414
      add_Unicode_Path_local_extra_field(z);
Lines 5647-5653 int putcentral(z) Link Here
5647
    if (z->flg & UTF8_BIT) {
5650
    if (z->flg & UTF8_BIT) {
5648
      /* If this flag is set, then restore UTF-8 as path name */
5651
      /* If this flag is set, then restore UTF-8 as path name */
5649
      use_uname = 1;
5652
      use_uname = 1;
5653
      tempzn -= nam;
5650
      nam = strlen(z->uname);
5654
      nam = strlen(z->uname);
5655
      tempzn += nam;
5651
    } else {
5656
    } else {
5652
      add_Unicode_Path_cen_extra_field(z);
5657
      add_Unicode_Path_cen_extra_field(z);
5653
    }
5658
    }
(-)zip30/zipnote.c (-1 / +8 lines)
Lines 575-580 char **argv; /* command line Link Here
575
      strcpy(z->iname, a+2);
575
      strcpy(z->iname, a+2);
576
#endif
576
#endif
577
577
578
#ifdef UNICODE_SUPPORT
579
#define UTF8_BIT (1 << 11)
580
      if (using_utf8) {
581
        z->uname = z->iname;
582
      }
583
#endif
584
578
/*
585
/*
579
 * Don't update z->nam here, we need the old value a little later.....
586
 * Don't update z->nam here, we need the old value a little later.....
580
 * The update is handled in zipcopy().
587
 * The update is handled in zipcopy().
Lines 661-667 char **argv; /* command line Link Here
661
    if ((r = zipcopy(z)) != ZE_OK)
668
    if ((r = zipcopy(z)) != ZE_OK)
662
      ziperr(r, "was copying an entry");
669
      ziperr(r, "was copying an entry");
663
  }
670
  }
664
  fclose(x);
671
  fclose(in_file);
665
672
666
  /* Write central directory and end of central directory with new comments */
673
  /* Write central directory and end of central directory with new comments */
667
  if ((c = zftello(y)) == (zoff_t)-1)    /* get start of central */
674
  if ((c = zftello(y)) == (zoff_t)-1)    /* get start of central */

Return to bug 322047