cpio/cpio-pattern-file-sigsegv.patch
Martin Pluskal 22ed1491e1 Accepting request 826878 from home:dirkmueller:branches:Archiving
- update to 2.13:
  * CVE-2015-1197, CVE-2016-2037, CVE-2019-14866 
- remove patches (upstream):
  cpio-2.12-out_of_bounds_write.patch, cpio-2.12-CVE-2019-14866.patch,
  cpio-2.12-util.c_no_return_in_nonvoid_fnc.patch,
  cpio-check_for_symlinks.patch

OBS-URL: https://build.opensuse.org/request/show/826878
OBS-URL: https://build.opensuse.org/package/show/Archiving/cpio?expand=0&rev=81
2020-08-19 10:06:19 +00:00

22 lines
678 B
Diff

Index: cpio-2.13/src/copyin.c
===================================================================
--- cpio-2.13.orig/src/copyin.c
+++ cpio-2.13/src/copyin.c
@@ -798,6 +798,8 @@ read_pattern_file ()
pattern_fp = fopen (pattern_file_name, "r");
if (pattern_fp == NULL)
open_fatal (pattern_file_name);
+ else
+ {
while (ds_fgetstr (pattern_fp, &pattern_name, '\n') != NULL)
{
if (new_num_patterns >= max_new_patterns)
@@ -812,6 +814,7 @@ read_pattern_file ()
}
if (ferror (pattern_fp) || fclose (pattern_fp) == EOF)
close_error (pattern_file_name);
+ }
for (i = 0; i < num_patterns; ++i)
new_save_patterns[i] = save_patterns[i];