Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package deltarpm for openSUSE:Factory checked in at 2024-09-15 12:33:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/deltarpm (Old) and /work/SRC/openSUSE:Factory/.deltarpm.new.29891 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "deltarpm" Sun Sep 15 12:33:13 2024 rev:33 rq:1200825 version:3.6.5 Changes: -------- --- /work/SRC/openSUSE:Factory/deltarpm/deltarpm.changes 2022-04-22 21:53:06.542727700 +0200 +++ /work/SRC/openSUSE:Factory/.deltarpm.new.29891/deltarpm.changes 2024-09-15 12:33:50.946142542 +0200 @@ -1,0 +2,16 @@ +Fri Sep 13 11:53:37 CEST 2024 - m...@suse.de + +- update to deltarpm-3.6.5 + * support for archive files bigger than 2GByte [bnc#1230547] + +------------------------------------------------------------------- +Wed Aug 7 13:58:05 CEST 2024 - m...@suse.de + +- update to deltarpm-3.6.4 + * support for threaded zstd + * use a tmp file instead of memory to hold the incore data + [bsc#1228948] +- dropped patches: + * deltarpm-b7987f6aa4211df3df03dcfc55a00b2ce7472e0a.patch + +------------------------------------------------------------------- Old: ---- deltarpm-3.6.3.tar.gz deltarpm-b7987f6aa4211df3df03dcfc55a00b2ce7472e0a.patch New: ---- deltarpm-3.6.5.tar.gz BETA DEBUG BEGIN: Old:- dropped patches: * deltarpm-b7987f6aa4211df3df03dcfc55a00b2ce7472e0a.patch BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ deltarpm.spec ++++++ --- /var/tmp/diff_new_pack.C2wQqA/_old 2024-09-15 12:33:51.558167897 +0200 +++ /var/tmp/diff_new_pack.C2wQqA/_new 2024-09-15 12:33:51.558167897 +0200 @@ -1,7 +1,7 @@ # # spec file for package deltarpm # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,15 +21,13 @@ # we need to build against recent rpm, so avoid the new payload %define _binary_payload w9.bzdio Name: deltarpm -Version: 3.6.3 +Version: 3.6.5 Release: 0 Summary: Tools to Create and Apply deltarpms License: BSD-3-Clause Group: System/Packages URL: https://github.com/rpm-software-management/deltarpm/ -Source: deltarpm-3.6.3.tar.gz -# is in upstream git -Patch0: deltarpm-b7987f6aa4211df3df03dcfc55a00b2ce7472e0a.patch +Source: deltarpm-3.6.5.tar.gz BuildRequires: libbz2-devel %if %{with python2} BuildRequires: python2-devel @@ -48,7 +46,6 @@ the old one. You do not need to have a copy of the old RPM, because deltarpms can also work with installed RPMs. - %package -n python2-deltarpm Summary: Tools to Create and Apply deltarpms Group: Development/Languages/Python ++++++ deltarpm-3.6.3.tar.gz -> deltarpm-3.6.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/Makefile new/deltarpm-3.6.5/Makefile --- old/deltarpm-3.6.3/Makefile 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/Makefile 2024-09-13 11:48:51.000000000 +0200 @@ -40,7 +40,7 @@ _deltarpmmodule.so: readdeltarpm.o rpmhead.o util.o md5.o cfile.o $(zlibbundled) for PY in $(PYTHONS) ; do \ if [ -x /usr/bin/$$PY-config ] && [ -x /usr/bin/$$PY ]; then \ - PYVER=`$$PY -c 'from distutils import sysconfig ; print(sysconfig.get_python_version())'`; \ + PYVER=`$$PY -c 'import sysconfig ; print(sysconfig.get_python_version())'`; \ PYCFLAGS=`$$PY-config --cflags`; \ if [ ! -f "python$$PYVER/$@" ]; then \ mkdir -p python$$PYVER ;\ @@ -78,8 +78,8 @@ install -m 644 drpmsync.8 $(DESTDIR)$(mandir)/man8 for PY in $(PYTHONS) ; do \ if [ -x /usr/bin/$$PY ]; then \ - PYLIB=`$$PY -c 'from distutils import sysconfig ; print(sysconfig.get_python_lib(1))'` ; \ - PYVER=`$$PY -c 'from distutils import sysconfig ; print(sysconfig.get_python_version())'` ; \ + PYLIB=`$$PY -c 'import sysconfig ; print(sysconfig.get_path("platlib"))'` ; \ + PYVER=`$$PY -c 'import sysconfig ; print(sysconfig.get_python_version())'` ; \ if [ -e python$$PYVER/_deltarpmmodule.so ]; then \ mkdir -p $(DESTDIR)$(pylibprefix)$$PYLIB ; \ install -m 755 python$$PYVER/_deltarpmmodule.so $(DESTDIR)$(pylibprefix)$$PYLIB ; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/NEWS new/deltarpm-3.6.5/NEWS --- old/deltarpm-3.6.3/NEWS 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/NEWS 2024-09-13 11:48:51.000000000 +0200 @@ -1,3 +1,11 @@ + What's new in deltarpm-3.6.5 +------------------------------ +- fix makedeltarpm failing if the cpio archive contained a file + bigger than 2GB + + What's new in deltarpm-3.6.4 +------------------------------ +- support for zstd compression What's new in deltarpm-3.6 ---------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/README new/deltarpm-3.6.5/README --- old/deltarpm-3.6.3/README 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/README 2024-09-13 11:48:51.000000000 +0200 @@ -1,6 +1,6 @@ --------------------- - deltarpm suite V3.4 + deltarpm suite V3.6 --------------------- A) Programs @@ -12,7 +12,7 @@ Options: -V: create a specific version, default is V3 - -s: write sequence info into file (usefull for creating + -s: write sequence info into file (useful for creating yast patchfiles) applydeltarpm [-v] [-p] [-c] [-C] [-r oldrpm] deltarpm newrpm @@ -96,7 +96,7 @@ 4 bytes seqlength (always 16 if header included in diff) x bytes sequence, containing 16 bytes seq md5sum - x bytes compressed seqence + x bytes compressed sequence (the sequence defines which files get included from the rpm filelist in which order) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/applydeltarpm.8 new/deltarpm-3.6.5/applydeltarpm.8 --- old/deltarpm-3.6.3/applydeltarpm.8 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/applydeltarpm.8 2024-09-13 11:48:51.000000000 +0200 @@ -39,8 +39,8 @@ .B -v to make it more verbose about its operation. -The second an third form can be used to check if the reconstruction -is possible. It may fail if the on-disk data got changed +The second and third form can be used to check if the reconstruction +is possible. It may fail if the on-disk data was changed (deltarpms are created in a way that config file changes do not matter) or the deltarpm does not match the rpm the delta was generated with. The diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/applydeltarpm.c new/deltarpm-3.6.5/applydeltarpm.c --- old/deltarpm-3.6.3/applydeltarpm.c 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/applydeltarpm.c 2024-09-13 11:48:51.000000000 +0200 @@ -848,7 +848,7 @@ } -/* construct the block "id". Note that the tupel (idx, id) will +/* construct the block "id". Note that the tuple (idx, id) will * only get bigger, so we use this to recycly no longer needed * blocks */ @@ -1449,8 +1449,10 @@ if (strcmp(fnevr, (char *)d.nevr) != 0) { fprintf(stderr, "delta rpm made for %s, not %s\n", d.nevr, fnevr); + free(fnevr); exit(1); } + free(fnevr); if (!seqmatches) { fprintf(stderr, "rpm does not match the one used for creating the deltarpm\n"); @@ -1575,7 +1577,7 @@ exit(1); } rpmMD5Update(&wrmd5, d.h->intro, 16); - strncpy((char *)d.h->dp + d.payformatoff, "cpio", 4); + memcpy((char *)d.h->dp + d.payformatoff, "cpio", 4); if (fwrite(d.h->data, 16 * d.h->cnt + d.h->dcnt, 1, ofp) != 1) { fprintf(stderr, "write error\n"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/combinedeltarpm.8 new/deltarpm-3.6.5/combinedeltarpm.8 --- old/deltarpm-3.6.3/combinedeltarpm.8 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/combinedeltarpm.8 2024-09-13 11:48:51.000000000 +0200 @@ -36,8 +36,8 @@ signature you can also specify a rpm with the .B -S option which will be used as signature reference. This feature can -be used to if a deltarpm was made against an unsigned rpm which -later got signed. +be used to if a deltarpm was made against an unsigned rpm which was +later signed. .SH MEMORY CONSIDERATIONS The implementation of combinedeltarpm currently unpacks the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/delta.c new/deltarpm-3.6.5/delta.c --- old/deltarpm-3.6.3/delta.c 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/delta.c 2024-09-13 11:48:51.000000000 +0200 @@ -227,7 +227,7 @@ unsigned int x = 0x83d31df4U; int i; for (i = HSIZE; i != 0; i--) - x = (x << 1) ^ (x & (1 << 31) ? 1 : 0) ^ noise[*buf++]; + x = (x << 1) ^ (x & (1u << 31) ? 1 : 0) ^ noise[*buf++]; return x; } @@ -255,14 +255,14 @@ unsigned int prime; unsigned int num; - hd = malloc(sizeof(*hd)); - if (!hd) - return 0; #ifdef BSDIFF_64BIT /* this is a 16GB limit for HSIZESHIFT == 4 */ if (len >= (bsuint)(0xffffffff / 4) << HSIZESHIFT) return 0; #endif + hd = malloc(sizeof(*hd)); + if (!hd) + return 0; num = (len + HSIZE - 1) >> HSIZESHIFT; prime = num * 4; for (s = 0; s < sizeof(primes)/sizeof(*primes) - 1; s++) @@ -335,7 +335,7 @@ scannext: if (llen >= 32 && scan - lscan >= HSIZE) goto gotit; - ssx = (ssx << 1) ^ (ssx & (1 << 31) ? 1 : 0) ^ noise[new[scan + HSIZE]]; + ssx = (ssx << 1) ^ (ssx & (1u << 31) ? 1 : 0) ^ noise[new[scan + HSIZE]]; oldc = noise[new[scan]] ^ (0x83d31df4U ^ 0x07a63be9U); #if HSIZE % 32 != 0 ssx ^= (oldc << (HSIZE % 32)) ^ (oldc >> (32 - (HSIZE % 32))); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/deltarpm.h new/deltarpm-3.6.5/deltarpm.h --- old/deltarpm-3.6.3/deltarpm.h 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/deltarpm.h 2024-09-13 11:48:51.000000000 +0200 @@ -69,6 +69,7 @@ unsigned char *addblk; drpmuint inlen; unsigned char *indata; + struct cfile *indata_cf; unsigned int compheadlen; unsigned int *offadjs; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/deltarpmmodule.c new/deltarpm-3.6.5/deltarpmmodule.c --- old/deltarpm-3.6.3/deltarpmmodule.c 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/deltarpmmodule.c 2024-09-13 11:48:51.000000000 +0200 @@ -45,7 +45,7 @@ /* Sequence */ if (d.seq) { char *tmp = calloc(d.seql * 2 + 1, sizeof(char)); - int i; + unsigned int i; if(tmp == NULL) { PyErr_SetFromErrno(PyExc_SystemError); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/drpmsync new/deltarpm-3.6.5/drpmsync --- old/deltarpm-3.6.3/drpmsync 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/drpmsync 2024-09-13 11:48:51.000000000 +0200 @@ -2486,7 +2486,7 @@ last if $buf eq "\@RSYNCD: OK"; die("$buf\n") if $buf =~ /^\@ERROR/s; if ($buf =~ /^\@RSYNCD: AUTHREQD /) { - die("'$module' needs authentification, but Digest::MD4 is not installed\n") unless $have_md4; + die("'$module' needs authentication, but Digest::MD4 is not installed\n") unless $have_md4; $user = "nobody" if !defined($user) || $user eq ''; $password = '' unless defined $password; my $digest = "$user ".Digest::MD4::md4_base64("\0\0\0\0$password".substr($buf, 18))."\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/drpmsync.8 new/deltarpm-3.6.5/drpmsync.8 --- old/deltarpm-3.6.3/drpmsync.8 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/drpmsync.8 2024-09-13 11:48:51.000000000 +0200 @@ -105,7 +105,7 @@ Configures whether drpmsync should request that the full rpm is always sent along with the delta. Only makes sense if you have a fast network connection so that applydeltarpm takes longer than -transmitting the ful rpm. +transmitting the full rpm. .sp .ne 3 .B deltarpmpath: @@ -117,7 +117,7 @@ variable. .SH SERVER MODE -Drpmsync can wither work as CGI script or as a standalone server. +Drpmsync can either work as CGI script or as a standalone server. CGI script mode is automatically selected if the .B REQUEST_METHOD environment variable is set. In this mode drpmsync expects the @@ -179,7 +179,7 @@ .BR true|false .PP If this setting is true the server does not combine deltarpms. -This increases to amount of data that has to be transferred but +This increases the amount of data that has to be transferred but reduces the processor load on the server. .sp .ne 3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/makedeltarpm.8 new/deltarpm-3.6.5/makedeltarpm.8 --- old/deltarpm-3.6.3/makedeltarpm.8 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/makedeltarpm.8 2024-09-13 11:48:51.000000000 +0200 @@ -73,7 +73,7 @@ .I oldrpm and the created patch rpm. This option tells makedeltarpm to exclude the files that -were not included in the patch rpm but are not byteswise identical +were not included in the patch rpm but are not bytewise identical to the ones in oldrpm. .PP makedeltarpm can also create an "identity" deltarpm by adding the @@ -88,7 +88,7 @@ .B -m option to enable a sliding block algorithm that needs .IR mbytes -megabytes of memory. This trades memory usage with the size of +megabytes of memory. This trades memory usage for the size of the created deltarpm. Furthermore, the uncompressed deltarpm payload is currently also stored in memory when this option is used, but it tends to be small in most cases. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/makedeltarpm.c new/deltarpm-3.6.5/makedeltarpm.c --- old/deltarpm-3.6.3/makedeltarpm.c 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/makedeltarpm.c 2024-09-13 11:48:51.000000000 +0200 @@ -669,7 +669,7 @@ unsigned int *fileflags, *filemodes, *filerdevs, *filesizes, *fileverify, *filecolors; int digestalgo = 1; unsigned int *digestalgoarray; - int i, l, l2, l3; + int i; int fd, nfd; struct cfile *bfd; struct cpiophys cph; @@ -905,6 +905,7 @@ if (alone && rpmonly) { /* this mode just updates the lead and signatures, no need to do a real diff */ + int l; if (verbose) fprintf(vfp, "reading rpm header...\n"); rpmMD5Init(&fullmd5); @@ -1104,6 +1105,7 @@ if (stream) { + FILE *indatafp; memset(&sd, 0, sizeof(sd)); sd.xnewdata = newcpio; sd.xnewdatal = newcpiolen; @@ -1113,13 +1115,19 @@ sd.new = xmalloc(sd.bsize); if (addblkcomp != -1) sd.cfa = cfile_open(CFILE_OPEN_WR, CFILE_IO_ALLOC, &d.addblk, addblkcomp, CFILE_LEN_UNLIMITED, 0, 0); - sd.cfi = cfile_open(CFILE_OPEN_WR, CFILE_IO_ALLOC, &d.indata, CFILE_COMP_UN, CFILE_LEN_UNLIMITED, 0, 0); + if (!(indatafp = tmpfile())) + { + fprintf(stderr, "indata tmpfile open failed\n"); + exit(1); + } + sd.cfi = cfile_open(CFILE_OPEN_WR, CFILE_IO_FILE, indatafp, CFILE_COMP_UN, CFILE_LEN_UNLIMITED, 0, 0); oldcpio = (void *)&sd; oldcpiolen = 0; sd.stepd = mkdiff_step_setup(DELTAMODE_HASH | (addblkcomp == -1 ? DELTAMODE_NOADDBLK : 0)); } else { + int l; while ((l = newbz->read(newbz, buf, sizeof(buf))) > 0) addtocpio(&newcpio, &newcpiolen, (unsigned char *)buf, l); if (l < 0) @@ -1153,6 +1161,7 @@ fprintf(vfp, "reading old rpm...\n"); if (rpmonly) { + int l; while ((l = bfd->read(bfd, buf, sizeof(buf))) > 0) addtocpio(&oldcpio, &oldcpiolen, (unsigned char *)buf, l); } @@ -1174,7 +1183,7 @@ cpiopos += sizeof(cph); if (memcmp(cph.magic, "070701", 6)) { - fprintf(stderr, "bad cpio archive in old deltarpm\n"); + fprintf(stderr, "bad cpio archive entry in old rpm\n"); if (verbose >= 2) { fprintf(stderr, "cph.magic: %02x%02x %02x%02x %02x%02x\n", cph.magic[0], cph.magic[1], cph.magic[2], cph.magic[3], cph.magic[4], cph.magic[5]); @@ -1233,7 +1242,7 @@ if (size != filesizes[i]) { if (verbose > 1) - fprintf(vfp, "skipping %s: size missmatch\n", np); + fprintf(vfp, "skipping %s: size mismatch\n", np); skipped_badsize++; } else if ((fileflags[i] & (FILE_CONFIG|FILE_MISSINGOK|FILE_GHOST)) != 0) @@ -1287,8 +1296,6 @@ hsize += S_ISREG(filemodes[i]) ? filesizes[i] : S_ISLNK(filemodes[i]) ? strlen(filelinktos[i]) : 0; hsize += (4 - (hsize & 3)) & 3; } - l = nsize + size; - l += (4 - (l & 3)) & 3; if (!skip) { @@ -1372,31 +1379,34 @@ } else skipped_all++; - l = l2 = size; - while (l > 0) + if (size) { - l3 = l > sizeof(buf) ? sizeof(buf) : l; - if (bfd->read(bfd, buf, l3) != l3) + unsigned int l = size; + while (l > 0) { - fprintf(stderr, "payload read failed (data)\n"); - exit(1); + unsigned int l2 = l > sizeof(buf) ? sizeof(buf) : l; + if (bfd->read(bfd, buf, (int)l2) != (int)l2) + { + fprintf(stderr, "payload read failed (data)\n"); + exit(1); + } + cpiopos += l2; + if (!skip) + addtocpio(&oldcpio, &oldcpiolen, (unsigned char *)buf, l2); + l -= l2; } - cpiopos += l3; - if (!skip) - addtocpio(&oldcpio, &oldcpiolen, (unsigned char *)buf, l3); - l -= l3; - } - if ((l2 & 3) != 0) - { - l2 = 4 - (l2 & 3); - if (bfd->read(bfd, buf, l2) != l2) + if ((size & 3) != 0) { - fprintf(stderr, "payload read failed (pad)\n"); - exit(1); + unsigned int l2 = 4 - (size & 3); + if (bfd->read(bfd, buf, (int)l2) != (int)l2) + { + fprintf(stderr, "payload read failed (pad)\n"); + exit(1); + } + cpiopos += l2; + if (!skip) + addtocpio(&oldcpio, &oldcpiolen, (unsigned char *)"\0\0\0", l2); } - cpiopos += l2; - if (!skip) - addtocpio(&oldcpio, &oldcpiolen, (unsigned char *)"\0\0\0", l2); } } namebuf = xfree(namebuf); @@ -1439,7 +1449,19 @@ addtocpio(&oldcpio, &oldcpiolen, 0, 0); if (sd.cfa) d.addblklen = sd.cfa->close(sd.cfa); - d.inlen = sd.cfi->close(sd.cfi); + if (fflush(sd.cfi->fp)) + { + fprintf(stderr, "indata tmpfile flush failed\n"); + exit(1); + } + d.inlen = ftello(sd.cfi->fp); + rewind(sd.cfi->fp); + d.indata_cf = cfile_open(CFILE_OPEN_RD, CFILE_IO_REOPEN, sd.cfi, CFILE_COMP_UN, CFILE_LEN_UNLIMITED, 0, 0); + if (!d.indata_cf) + { + fprintf(stderr, "indata tmpfile reopen failed\n"); + exit(1); + } sd.cfa = 0; sd.cfi = 0; instr = sd.instr; @@ -1558,6 +1580,12 @@ sd.new = xfree(sd.new); offadjs = xfree(offadjs); d.targetnevr = xfree(d.targetnevr); + if (d.indata_cf) + { + fclose(d.indata_cf->fp); + d.indata_cf->fp = 0; + d.indata_cf->close(d.indata_cf); + } exit(0); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/md5.c new/deltarpm-3.6.5/md5.c --- old/deltarpm-3.6.3/md5.c 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/md5.c 2024-09-13 11:48:51.000000000 +0200 @@ -161,7 +161,7 @@ if (ctx->doByteReverse) byteReverse((unsigned char *) ctx->buf, 4); memcpy(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } /* The four core functions - F1 is optimized somewhat */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/rpmoffs.c new/deltarpm-3.6.5/rpmoffs.c --- old/deltarpm-3.6.3/rpmoffs.c 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/rpmoffs.c 2024-09-13 11:48:51.000000000 +0200 @@ -288,6 +288,11 @@ { rpmbalen += 0x800 * 4; rpmb = realloc(rpmb, rpmbalen); + if (!rpmb) + { + fprintf(stderr, "out of memory\n"); + exit(1); + } } readblk(fp, rpmb + rpmblen, filepos2++); rpmblen += 0x800; @@ -312,6 +317,11 @@ { rpmbalen += 0x800 * 4; rpmb = realloc(rpmb, rpmbalen); + if (!rpmb) + { + fprintf(stderr, "out of memory\n"); + exit(1); + } } readblk(fp, rpmb + rpmblen, filepos2++); rpmblen += 0x800; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6.3/writedeltarpm.c new/deltarpm-3.6.5/writedeltarpm.c --- old/deltarpm-3.6.3/writedeltarpm.c 2020-08-27 17:34:37.000000000 +0200 +++ new/deltarpm-3.6.5/writedeltarpm.c 2024-09-13 11:48:51.000000000 +0200 @@ -119,6 +119,7 @@ exit(1); } rpmMD5Update(&paymd5, d->h->intro, 16); + memset(oldpayformat, 0, sizeof(oldpayformat)); if (d->payformatoff) { memcpy(oldpayformat, d->h->dp + d->payformatoff, 4); @@ -274,6 +275,20 @@ exit(1); } } + else if (!d->indata && d->indata_cf) + { + size_t oldbytes = d->indata_cf->bytes; + if (cfile_copy(d->indata_cf, bfd, 0) == -1) + { + fprintf(stderr, "data write failed\n"); + exit(1); + } + if (d->indata_cf->bytes - oldbytes != d->inlen) + { + fprintf(stderr, "data write did not write the correct number of bytes\n"); + exit(1); + } + } else if (bfd->write(bfd, d->indata, d->inlen) != d->inlen) { fprintf(stderr, "data write failed\n");