rpm-build/lib
Alexey Tourbin 3d9823b9a4 cpio.c: fixed the integer conversion involving cpio file size
The code in question uses an improvised "strntoul" function (hidden
behind the GET_NUM_FIELD macro) which returns "int".

int cpioHeaderRead(FSM_t fsm, struct stat * st)
...
    GET_NUM_FIELD(hdr.filesize, st->st_size);

When a file size undergoes an "int bottleneck", it cannot be safely
converted back to an unsigned 64-bit integer.  By the C rules, if the
size is in the range 2G..4G-1, int becomes negative (or this may be
undefined behaviour already, I'm not a language lawyer), and conversion
to unsigned 64-bit is performed as if by adding 2^64 to the negative
value.

So you get a huge 64-bit file size.  Funnily enough, if you truncate it
to 32 bits, it's back to normal!  That's why things worked with 32-bit
size_t.

static int expandRegular(/*@special@*/ FSM_t fsm)
...
    size_t left = st->st_size;
2018-06-30 15:36:24 +03:00
..
.lclintrc re-added .lclintrc and .cvsignore files from CVS 2002-03-25 20:27:37 +00:00
al.c system.h: moved AUTO_REALLOC from depends.h 2011-01-06 03:26:09 +03:00
al.h al.c: removed extra arguments in alAllSatisfiesDepend 2009-10-04 12:44:38 +04:00
closeall.c fixed compilation 2003-11-24 19:20:13 +00:00
cpio.c cpio.c: fixed the integer conversion involving cpio file size 2018-06-30 15:36:24 +03:00
cpio.h Added SELinux support 2010-08-24 16:59:07 +00:00
depends.c system.h: moved AUTO_REALLOC from depends.h 2011-01-06 03:26:09 +03:00
depends.h system.h: moved AUTO_REALLOC from depends.h 2011-01-06 03:26:09 +03:00
formats.c Migrate to new libbeecrypt 2010-08-12 20:41:06 +00:00
fs.c lib/fs.c (getFilesystemList): Drop "/mnt" support 2007-03-27 15:41:38 +00:00
fsm.c changed a few more vars int -> uint32_t/size_t 2018-06-26 12:42:44 +03:00
fsm.h Added SELinux support 2010-08-24 16:59:07 +00:00
header_internal.c lib/header_internal.c (headerGetLangs): Fix stupid X<=Y<=Z comparison 2009-09-24 11:36:29 +04:00
header_internal.h header.c: backported headerSetInstance() and headerGetInstance() from rpm.org 2010-08-22 02:16:02 +04:00
header.h header.h: shut up -Wextra warning 2011-01-03 09:52:38 +03:00
Makefile.am Fix automake warnings 2014-02-15 22:19:47 +00:00
manifest.c rpmReadPackageManifest: Fix comments handling 2008-04-08 15:28:53 +00:00
manifest.h Initial revision 2002-03-25 20:16:26 +00:00
misc.c Change default %_tmppath value to %_tmpdir 2012-12-22 17:07:17 +00:00
misc.h transaction.c: revamped decideFileFate() akin to filecmp() 2009-03-09 20:11:22 +03:00
order.c removed ancient dependency loop whiteout mechanism (rpm.org) 2011-01-23 02:30:59 +03:00
package.c package.c (readPackageHeaders): use posix_fadvise(2) to disable readahead 2009-05-10 23:32:48 +04:00
poptI.c removed support for repackaging and rollbacks (rpm.org) 2011-09-23 02:47:36 +04:00
poptK.c sync with rpm4 branch: include local headers 2002-03-25 22:02:39 +00:00
poptQV.c removed --fileid query selector and Filemd5s rpmdb index (rpm.org) 2011-01-22 17:35:13 +03:00
problems.c s/relocateable/relocatable/ (jbj) 2009-03-08 20:12:18 +03:00
psm.c psm.c: write installed/removed package buildtime to syslog 2014-06-24 19:03:56 +04:00
psm.h removed support for repackaging and rollbacks (rpm.org) 2011-09-23 02:47:36 +04:00
query.c removed --fileid query selector and Filemd5s rpmdb index (rpm.org) 2011-01-22 17:35:13 +03:00
rpmchecksig.c sync with rpm4 branch: include local headers 2002-03-25 22:02:39 +00:00
rpmcli.h removed support for repackaging and rollbacks (rpm.org) 2011-09-23 02:47:36 +04:00
rpminstall.c removed support for repackaging and rollbacks (rpm.org) 2011-09-23 02:47:36 +04:00
rpmlead.c sync with rpm4 branch: include local headers 2002-03-25 22:02:39 +00:00
rpmlead.h Include local headers. 2006-05-15 03:26:57 +04:00
rpmlib.h Backport Disttag: syntax to spec file parser and header content. 2014-06-24 19:00:52 +04:00
rpmlibprov.c rpmlibprov.c: added rpmlib(SetVersions) feature 2010-09-11 01:58:23 +04:00
rpmrc.c Change default %_tmppath value to %_tmpdir 2012-12-22 17:07:17 +00:00
set.c set.c: rewrite without nested functions 2015-05-21 18:08:21 +03:00
set.h set.c: minor cleanup and English fixes 2011-06-14 00:00:54 +04:00
signature.c signature.c: change file size fmt %d -> %zu 2018-06-26 12:42:44 +03:00
signature.h Include local headers. 2006-05-15 03:26:57 +04:00
stringbuf.c Initial revision 2002-03-25 20:16:26 +00:00
stringbuf.h Initial revision 2002-03-25 20:16:26 +00:00
transaction.c removed support for repackaging and rollbacks (rpm.org) 2011-09-23 02:47:36 +04:00
verify.c verify.c: fixed RPMVERIFY_FILESIZE for 2G+ files 2018-06-26 12:42:44 +03:00