Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
zziplib
bsc1187526-fix-Incorrect-handling-of-function-z...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bsc1187526-fix-Incorrect-handling-of-function-zzip_fread-return-value.patch of Package zziplib
Index: zziplib-0.13.69/bins/unzip-mem.c =================================================================== --- zziplib-0.13.69.orig/bins/unzip-mem.c +++ zziplib-0.13.69/bins/unzip-mem.c @@ -81,7 +81,7 @@ static void zzip_mem_entry_pipe(ZZIP_MEM if (file) { char buffer[1024]; int len; - while ((len = zzip_mem_disk_fread (buffer, 1024, 1, file))) + while (0 < (len = zzip_mem_disk_fread (buffer, 1024, 1, file))) fwrite (buffer, len, 1, out); zzip_mem_disk_fclose (file); @@ -115,7 +115,7 @@ static void zzip_mem_entry_test(ZZIP_MEM { unsigned long crc = crc32 (0L, NULL, 0); unsigned char buffer[1024]; int len; - while ((len = zzip_mem_disk_fread (buffer, 1024, 1, file))) { + while (0 < (len = zzip_mem_disk_fread (buffer, 1024, 1, file))) { crc = crc32 (crc, buffer, len); } Index: zziplib-0.13.69/bins/unzzipcat-big.c =================================================================== --- zziplib-0.13.69.orig/bins/unzzipcat-big.c +++ zziplib-0.13.69/bins/unzzipcat-big.c @@ -27,7 +27,7 @@ static void unzzip_big_entry_fprint(ZZIP if (file) { char buffer[1024]; int len; - while ((len = zzip_entry_fread (buffer, 1024, 1, file))) + while (0 < (len = zzip_entry_fread (buffer, 1024, 1, file))) { DBG2("entry read %i", len); fwrite (buffer, len, 1, out); @@ -46,7 +46,7 @@ static void unzzip_cat_file(FILE* disk, if (file) { char buffer[1024]; int len; - while ((len = zzip_entry_fread (buffer, 1024, 1, file))) + while (0 < (len = zzip_entry_fread (buffer, 1024, 1, file))) fwrite (buffer, len, 1, out); zzip_entry_fclose (file); Index: zziplib-0.13.69/bins/unzzipcat-mem.c =================================================================== --- zziplib-0.13.69.orig/bins/unzzipcat-mem.c +++ zziplib-0.13.69/bins/unzzipcat-mem.c @@ -36,7 +36,7 @@ static void unzzip_mem_entry_fprint(ZZIP if (file) { char buffer[1024]; int len; - while ((len = zzip_mem_disk_fread (buffer, 1024, 1, file))) + while (0 < (len = zzip_mem_disk_fread (buffer, 1024, 1, file))) fwrite (buffer, len, 1, out); zzip_mem_disk_fclose (file); @@ -49,7 +49,7 @@ static void unzzip_mem_disk_cat_file(ZZI if (file) { char buffer[1025]; int len; - while ((len = zzip_mem_disk_fread (buffer, 1, 1024, file))) + while (0 < (len = zzip_mem_disk_fread (buffer, 1, 1024, file))) { fwrite (buffer, 1, len, out); } Index: zziplib-0.13.69/bins/unzzipcat-mix.c =================================================================== --- zziplib-0.13.69.orig/bins/unzzipcat-mix.c +++ zziplib-0.13.69/bins/unzzipcat-mix.c @@ -60,7 +60,7 @@ static void unzzip_cat_file(ZZIP_DIR* di if (file) { char buffer[1024]; int len; - while ((len = zzip_fread (buffer, 1, 1024, file))) + while (0 < (len = zzip_fread (buffer, 1, 1024, file))) { fwrite (buffer, 1, len, out); } Index: zziplib-0.13.69/bins/unzzipcat-zip.c =================================================================== --- zziplib-0.13.69.orig/bins/unzzipcat-zip.c +++ zziplib-0.13.69/bins/unzzipcat-zip.c @@ -60,7 +60,7 @@ static void unzzip_cat_file(ZZIP_DIR* di if (file) { char buffer[1024]; int len; - while ((len = zzip_file_read (file, buffer, 1024))) + while (0 < (len = zzip_file_read (file, buffer, 1024))) { fwrite (buffer, 1, len, out); } Index: zziplib-0.13.69/bins/unzzipshow.c =================================================================== --- zziplib-0.13.69.orig/bins/unzzipshow.c +++ zziplib-0.13.69/bins/unzzipshow.c @@ -22,7 +22,7 @@ static void zzip_entry_fprint(ZZIP_ENTRY if (file) { char buffer[1024]; int len; - while ((len = zzip_entry_fread (buffer, 1024, 1, file))) + while (0 < (len = zzip_entry_fread (buffer, 1024, 1, file))) fwrite (buffer, len, 1, out); zzip_entry_fclose (file); @@ -35,7 +35,7 @@ static void zzip_cat_file(FILE* disk, ch if (file) { char buffer[1024]; int len; - while ((len = zzip_entry_fread (buffer, 1024, 1, file))) + while (0 < (len = zzip_entry_fread (buffer, 1024, 1, file))) fwrite (buffer, len, 1, out); zzip_entry_fclose (file); Index: zziplib-0.13.69/bins/zzipmake-zip.c =================================================================== --- zziplib-0.13.69.orig/bins/zzipmake-zip.c +++ zziplib-0.13.69/bins/zzipmake-zip.c @@ -57,7 +57,7 @@ int rezzip_make (int argc, char ** argv) continue; } - while ((n = read (input, buf, 16))) + while (0 < (n = read (input, buf, 16))) { zzip_write (output, buf, n); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor