Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
zziplib.20154
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.20154
Index: zziplib-0.13.67/bins/unzzipcat-mem.c =================================================================== --- zziplib-0.13.67.orig/bins/unzzipcat-mem.c +++ zziplib-0.13.67/bins/unzzipcat-mem.c @@ -29,7 +29,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); @@ -42,7 +42,7 @@ static void unzzip_mem_disk_cat_file(ZZI if (file) { char buffer[1024]; 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.67/bins/unzip-mem.c =================================================================== --- zziplib-0.13.67.orig/bins/unzip-mem.c +++ zziplib-0.13.67/bins/unzip-mem.c @@ -86,7 +86,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); @@ -120,7 +120,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.67/bins/unzzipcat-big.c =================================================================== --- zziplib-0.13.67.orig/bins/unzzipcat-big.c +++ zziplib-0.13.67/bins/unzzipcat-big.c @@ -21,7 +21,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); @@ -40,7 +40,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.67/bins/unzzipcat-mix.c =================================================================== --- zziplib-0.13.67.orig/bins/unzzipcat-mix.c +++ zziplib-0.13.67/bins/unzzipcat-mix.c @@ -28,7 +28,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.67/bins/unzzipcat-zip.c =================================================================== --- zziplib-0.13.67.orig/bins/unzzipcat-zip.c +++ zziplib-0.13.67/bins/unzzipcat-zip.c @@ -28,7 +28,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.67/bins/unzzipshow.c =================================================================== --- zziplib-0.13.67.orig/bins/unzzipshow.c +++ zziplib-0.13.67/bins/unzzipshow.c @@ -27,7 +27,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); @@ -40,7 +40,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.67/bins/zzipmake-zip.c =================================================================== --- zziplib-0.13.67.orig/bins/zzipmake-zip.c +++ zziplib-0.13.67/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