"Fossies" - the Fresh Open Source Software Archive

Member "xorriso-1.5.4/pl01.diff" (6 Feb 2021, 1787 Bytes) of package /linux/misc/xorriso-1.5.4.pl02.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 --- xorriso-1.5.4/libisofs/rockridge.c  2021-01-30 15:30:50.000000000 +0100
    2 +++ xorriso-1.5.5/libisofs/rockridge.c  2021-02-03 12:54:49.000000000 +0100
    3 @@ -1166,7 +1166,7 @@ int susp_calc_nm_sl_al(Ecma119Image *t,
    4                         size_t *su_size, size_t *ce, size_t base_ce, int flag)
    5  {
    6      char *name;
    7 -    size_t namelen, su_mem, ce_mem;
    8 +    size_t namelen, su_mem, ce_mem, ce_prepad = 0;
    9      void *xipt;
   10      size_t num_aapt = 0, sua_free = 0;
   11      int ret;
   12 @@ -1197,7 +1197,7 @@ int susp_calc_nm_sl_al(Ecma119Image *t,
   13  
   14  #endif /* Libisofs_ce_calc_debuG */
   15  
   16 -            *ce += BLOCK_SIZE - (base_ce % BLOCK_SIZE);
   17 +            ce_prepad = BLOCK_SIZE - (base_ce % BLOCK_SIZE);
   18          }
   19      }
   20  
   21 @@ -1210,8 +1210,10 @@ int susp_calc_nm_sl_al(Ecma119Image *t,
   22  
   23      if (flag & 1) {
   24         /* Account for 28 bytes of CE field */
   25 -       if (*su_size + 28 > space)
   26 +       if (*su_size + 28 > space) {
   27 +           *ce += ce_prepad;
   28             return -1;
   29 +       }
   30         *su_size += 28;
   31      }
   32  
   33 @@ -1242,8 +1244,10 @@ int susp_calc_nm_sl_al(Ecma119Image *t,
   34          int cew = (*ce != 0); /* are we writing to CA ? */
   35  
   36          dest = get_rr_fname(t, ((IsoSymlink*)n->node)->dest);
   37 -        if (dest == NULL)
   38 +        if (dest == NULL) {
   39 +            *ce += ce_prepad;
   40              return -2;
   41 +        }
   42          prev = dest;
   43          cur = strchr(prev, '/');
   44          while (1) {
   45 @@ -1353,6 +1357,9 @@ int susp_calc_nm_sl_al(Ecma119Image *t,
   46      if (*ce > 0 && !(flag & 1))
   47          goto unannounced_ca;
   48  
   49 +    *ce += ce_prepad;
   50 +    ce_prepad = 0;
   51 +
   52      /* obtain num_aapt from node */
   53      xipt = NULL;
   54      num_aapt = 0;
   55 @@ -1405,6 +1412,7 @@ int susp_calc_nm_sl_al(Ecma119Image *t,
   56          }
   57      }
   58  
   59 +    *ce += ce_prepad;
   60      return 1;
   61  
   62  unannounced_ca:;