Mageia Bugzilla – Attachment 8541 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]
patch to show the right size up to 4GB
perl-URPM-overflow-unsigned.patch (text/plain), 1.08 KB, created by
Giuseppe Ghibò
on 2016-10-15 22:22:59 CEST
(
hide
)
Description:
patch to show the right size up to 4GB
Filename:
MIME Type:
Creator:
Giuseppe Ghibò
Created:
2016-10-15 22:22:59 CEST
Size:
1.08 KB
patch
obsolete
>diff -up URPM-5.08/URPM.xs.64bit URPM-5.08/URPM.xs >--- URPM-5.08/URPM.xs.64bit 2016-10-15 21:20:42.717496985 +0200 >+++ URPM-5.08/URPM.xs 2016-10-15 21:23:28.208837402 +0200 >@@ -46,7 +46,7 @@ typedef struct rpmSpec_s * Spec; > > struct s_Package { > Header h; >- int filesize; >+ unsigned int filesize; > unsigned flag; > char *info; > char *requires; >@@ -1751,7 +1751,7 @@ Pkg_compare(pkg, evr) > OUTPUT: > RETVAL > >-int >+unsigned int > Pkg_size(pkg) > URPM::Package pkg > CODE: >@@ -1779,7 +1779,7 @@ Pkg_set_filesize(pkg, filesize) > PPCODE: > pkg->filesize = filesize; > >-int >+unsigned int > Pkg_filesize(pkg) > URPM::Package pkg > CODE: >@@ -2121,7 +2121,7 @@ Pkg_build_info(pkg, fileno, provides_fil > if (size < sizeof(buff)) write_nocheck(fileno, buff, size); > } > if (pkg->filesize) { >- size = snprintf(buff, sizeof(buff), "@filesize@%d\n", pkg->filesize); >+ size = snprintf(buff, sizeof(buff), "@filesize@%u\n", pkg->filesize); > if (size < sizeof(buff)) write_nocheck(fileno, buff, size); > } > size = snprintf(buff, sizeof(buff), "@info@%s\n", pkg->info);
diff -up URPM-5.08/URPM.xs.64bit URPM-5.08/URPM.xs --- URPM-5.08/URPM.xs.64bit 2016-10-15 21:20:42.717496985 +0200 +++ URPM-5.08/URPM.xs 2016-10-15 21:23:28.208837402 +0200 @@ -46,7 +46,7 @@ typedef struct rpmSpec_s * Spec; struct s_Package { Header h; - int filesize; + unsigned int filesize; unsigned flag; char *info; char *requires; @@ -1751,7 +1751,7 @@ Pkg_compare(pkg, evr) OUTPUT: RETVAL -int +unsigned int Pkg_size(pkg) URPM::Package pkg CODE: @@ -1779,7 +1779,7 @@ Pkg_set_filesize(pkg, filesize) PPCODE: pkg->filesize = filesize; -int +unsigned int Pkg_filesize(pkg) URPM::Package pkg CODE: @@ -2121,7 +2121,7 @@ Pkg_build_info(pkg, fileno, provides_fil if (size < sizeof(buff)) write_nocheck(fileno, buff, size); } if (pkg->filesize) { - size = snprintf(buff, sizeof(buff), "@filesize@%d\n", pkg->filesize); + size = snprintf(buff, sizeof(buff), "@filesize@%u\n", pkg->filesize); if (size < sizeof(buff)) write_nocheck(fileno, buff, size); } size = snprintf(buff, sizeof(buff), "@info@%s\n", pkg->info);
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