Mageia Bugzilla – Attachment 8543 Details for
Bug 19571
overflow when querying for size with urpmq
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
extra patch for the full 64bit support
perl-URPM-overflow-full64bit.patch (text/plain), 1.77 KB, created by
Giuseppe Ghibò
on 2016-10-15 22:43:36 CEST
(
hide
)
Description:
extra patch for the full 64bit support
Filename:
MIME Type:
Creator:
Giuseppe Ghibò
Created:
2016-10-15 22:43:36 CEST
Size:
1.77 KB
patch
obsolete
>diff -up URPM-5.08/typemap.full64bit URPM-5.08/typemap >--- URPM-5.08/typemap.full64bit 2016-10-15 22:08:32.076253617 +0200 >+++ URPM-5.08/typemap 2016-10-15 22:11:38.604533546 +0200 >@@ -1,3 +1,14 @@ > URPM::DB T_PTROBJ > URPM::Transaction T_PTROBJ > URPM::Package T_PTROBJ >+ >+TYPEMAP >+uint64_t T_U_LONG_LONG >+ >+INPUT >+T_U_LONG_LONG >+ $var = SvU64($arg) >+ >+OUTPUT >+T_U_LONG_LONG >+ $arg = newSVu64($var); >diff -up URPM-5.08/URPM.xs.full64bit URPM-5.08/URPM.xs >--- URPM-5.08/URPM.xs.full64bit 2016-10-15 22:06:10.886798956 +0200 >+++ URPM-5.08/URPM.xs 2016-10-15 22:08:21.539294306 +0200 >@@ -1760,7 +1760,7 @@ Pkg_compare(pkg, evr) > OUTPUT: > RETVAL > >-unsigned long >+uint64_t > Pkg_size(pkg) > URPM::Package pkg > CODE: >@@ -1770,12 +1770,12 @@ Pkg_size(pkg) > if ((s = strchr(pkg->info, '@')) != NULL && (s = strchr(s+1, '@')) != NULL) { > if ((eos = strchr(s+1, '@')) != NULL) > *eos = 0; /* mark end of string to enable searching backwards */ >- RETVAL = (unsigned long) atoll(s+1); >+ RETVAL = atoll(s+1); > if (eos != NULL) *eos = '@'; > } else > RETVAL = 0; > } else if (pkg->h) >- RETVAL = (unsigned long) get_int2(pkg->h, RPMTAG_LONGSIZE, RPMTAG_SIZE); >+ RETVAL = get_int2(pkg->h, RPMTAG_LONGSIZE, RPMTAG_SIZE); > else > RETVAL = 0; > OUTPUT: >@@ -1784,11 +1784,11 @@ Pkg_size(pkg) > void > Pkg_set_filesize(pkg, filesize) > URPM::Package pkg >- size_t filesize; >+ uint64_t filesize; > PPCODE: > pkg->filesize = filesize; > >-unsigned long >+uint64_t > Pkg_filesize(pkg) > URPM::Package pkg > CODE: >@@ -2096,7 +2096,7 @@ Pkg_build_info(pkg, fileno, provides_fil > CODE: > if (pkg->info) { > char buff[65536*2]; >- size_t size; >+ uint64_t size; > > /* info line should be the last to be written */ > if (pkg->provides && *pkg->provides) {
diff -up URPM-5.08/typemap.full64bit URPM-5.08/typemap --- URPM-5.08/typemap.full64bit 2016-10-15 22:08:32.076253617 +0200 +++ URPM-5.08/typemap 2016-10-15 22:11:38.604533546 +0200 @@ -1,3 +1,14 @@ URPM::DB T_PTROBJ URPM::Transaction T_PTROBJ URPM::Package T_PTROBJ + +TYPEMAP +uint64_t T_U_LONG_LONG + +INPUT +T_U_LONG_LONG + $var = SvU64($arg) + +OUTPUT +T_U_LONG_LONG + $arg = newSVu64($var); diff -up URPM-5.08/URPM.xs.full64bit URPM-5.08/URPM.xs --- URPM-5.08/URPM.xs.full64bit 2016-10-15 22:06:10.886798956 +0200 +++ URPM-5.08/URPM.xs 2016-10-15 22:08:21.539294306 +0200 @@ -1760,7 +1760,7 @@ Pkg_compare(pkg, evr) OUTPUT: RETVAL -unsigned long +uint64_t Pkg_size(pkg) URPM::Package pkg CODE: @@ -1770,12 +1770,12 @@ Pkg_size(pkg) if ((s = strchr(pkg->info, '@')) != NULL && (s = strchr(s+1, '@')) != NULL) { if ((eos = strchr(s+1, '@')) != NULL) *eos = 0; /* mark end of string to enable searching backwards */ - RETVAL = (unsigned long) atoll(s+1); + RETVAL = atoll(s+1); if (eos != NULL) *eos = '@'; } else RETVAL = 0; } else if (pkg->h) - RETVAL = (unsigned long) get_int2(pkg->h, RPMTAG_LONGSIZE, RPMTAG_SIZE); + RETVAL = get_int2(pkg->h, RPMTAG_LONGSIZE, RPMTAG_SIZE); else RETVAL = 0; OUTPUT: @@ -1784,11 +1784,11 @@ Pkg_size(pkg) void Pkg_set_filesize(pkg, filesize) URPM::Package pkg - size_t filesize; + uint64_t filesize; PPCODE: pkg->filesize = filesize; -unsigned long +uint64_t Pkg_filesize(pkg) URPM::Package pkg CODE: @@ -2096,7 +2096,7 @@ Pkg_build_info(pkg, fileno, provides_fil CODE: if (pkg->info) { char buff[65536*2]; - size_t size; + uint64_t size; /* info line should be the last to be written */ if (pkg->provides && *pkg->provides) {
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 19571
:
8522
|
8523
|
8525
|
8528
|
8529
|
8530
|
8531
|
8537
|
8538
|
8539
|
8541
|
8542
|
8543
|
8547
|
8548
|
8549
|
8563
|
8564
|
8565
|
8566