RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Anders F. Björklund
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  Module: xar                              Date:   20-Oct-2007 21:03:56
  Branch: HEAD                             Handle: 2007102020035600

  Modified files:
    xar                     ChangeLog
    xar/lib                 archive.c io.c

  Log:
    some bugfixes from upstream

  Summary:
    Revision    Changes     Path
    1.6         +3  -0      xar/ChangeLog
    1.7         +9  -1      xar/lib/archive.c
    1.7         +10 -4      xar/lib/io.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: xar/ChangeLog
  ============================================================================
  $ cvs diff -u -r1.5 -r1.6 ChangeLog
  --- xar/ChangeLog     2 Oct 2007 21:51:55 -0000       1.5
  +++ xar/ChangeLog     20 Oct 2007 19:03:56 -0000      1.6
  @@ -1,4 +1,7 @@
   devel
  +     * lib/io.c: Issue 41, fixed a bug where rsize was being used 
uninitialized.
  +     * lib/io.c: Issue 42, log a warning and continue if archived-checksum 
doesn't appear when archiving a file.
  +     * lib/archive.c: Issue 43, free the buffer in xar_extract_tobuffersz() 
if there is an error extracting the file.
        2007-10-02 Rob Braun [EMAIL PROTECTED]
        *  test/compression test/data include/config.h.in include/xar.h.in 
src/xar.1 src/xar.c configure.ac lib/lzmaxar.c lib/lzmaxar.h lib/io.c 
lib/bzxar.c  lib/Makefile.inc.in lib/zxar.c INSTALL: Incorporate a patch from 
anders.f.bjorklund for adding lzma compression support.
        2007-10-02 Rob Braun [EMAIL PROTECTED]
  @@ .
  patch -p0 <<'@@ .'
  Index: xar/lib/archive.c
  ============================================================================
  $ cvs diff -u -r1.6 -r1.7 archive.c
  --- xar/lib/archive.c 2 Oct 2007 21:46:42 -0000       1.6
  +++ xar/lib/archive.c 20 Oct 2007 19:03:56 -0000      1.7
  @@ -1168,6 +1168,7 @@
   */
   int32_t xar_extract_tobuffersz(xar_t x, xar_file_t f, char **buffer, size_t 
*size) {
        const char *sizestring = NULL;
  +     int32_t ret;
        
        if(0 != xar_prop_get(f,"data/size",&sizestring)){
                if(0 != xar_prop_get(f, "type", &sizestring))
  @@ -1186,7 +1187,14 @@
                return -1;
        }
        
  -     return xar_arcmod_extract(x,f,NULL,*buffer,*size);
  +     ret = xar_arcmod_extract(x,f,NULL,*buffer,*size);
  +     if( ret ) {
  +             *size = 0;
  +             free(buffer);
  +             *buffer = NULL;
  +     }
  +
  +     return ret;
   }
   
   int32_t xar_extract_tostream_init(xar_t x, xar_file_t f, xar_stream *stream) 
{
  @@ .
  patch -p0 <<'@@ .'
  Index: xar/lib/io.c
  ============================================================================
  $ cvs diff -u -r1.6 -r1.7 io.c
  --- xar/lib/io.c      2 Oct 2007 21:51:56 -0000       1.6
  +++ xar/lib/io.c      20 Oct 2007 19:03:56 -0000      1.7
  @@ -221,7 +221,7 @@
        int64_t readsize=0, writesize=0, inc = 0;
        void *inbuf;
        char *tmpstr = NULL;
  -     const char *opt, *csum;
  +     const char *opt = NULL, *csum = NULL;
        off_t orig_heap_offset = XAR(x)->heap_offset;
        xar_file_t tmpf = NULL;
        xar_prop_t tmpp = NULL;
  @@ -295,7 +295,8 @@
        tmpp = xar_prop_pget(p, "archived-checksum");
        if( tmpp )
                csum = xar_prop_getvalue(tmpp);
  -     tmpf = xmlHashLookup(XAR(x)->csum_hash, BAD_CAST(csum));
  +     if( csum )
  +             tmpf = xmlHashLookup(XAR(x)->csum_hash, BAD_CAST(csum));
        if( tmpf ) {
                const char *attr = xar_prop_getkey(p);
                opt = xar_opt_get(x, XAR_OPT_LINKSAME);
  @@ -348,8 +349,13 @@
                        }
                        
                }
  -     } else {
  +     } else if( csum ) {
                xmlHashAddEntry(XAR(x)->csum_hash, BAD_CAST(csum), XAR_FILE(f));
  +     } else {
  +             xar_err_new(x);
  +             xar_err_set_file(x, f);
  +             xar_err_set_string(x, "No archived-checksum");
  +             xar_err_callback(x, XAR_SEVERITY_WARNING, 
XAR_ERR_ARCHIVE_CREATION);
        }
   
        asprintf(&tmpstr, "%"PRIu64, readsize);
  @@ -392,7 +398,7 @@
   
        memset(modulecontext, 0, sizeof(void*)*modulecount);
   
  -     bsize = get_rsize(x);
  +     def_bsize = get_rsize(x);
   
        opt = NULL;
        tmpp = xar_prop_pget(p, "offset");
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                [email protected]

Reply via email to