e4d46accbe
- Fix regression in last update (bsc#1189465) * fix-CVE-2021-38185_2.patch * fix-CVE-2021-38185_3.patch OBS-URL: https://build.opensuse.org/request/show/912911 OBS-URL: https://build.opensuse.org/package/show/Archiving/cpio?expand=0&rev=87
14 lines
474 B
Diff
14 lines
474 B
Diff
Index: cpio-2.13/src/dstring.c
|
|
===================================================================
|
|
--- cpio-2.13.orig/src/dstring.c
|
|
+++ cpio-2.13/src/dstring.c
|
|
@@ -115,7 +115,7 @@ void
|
|
ds_concat (dynamic_string *s, char const *str)
|
|
{
|
|
size_t len = strlen (str);
|
|
- while (len + 1 > s->ds_size)
|
|
+ while (len + s->ds_idx + 1 > s->ds_size)
|
|
s->ds_string = x2nrealloc (s->ds_string, &s->ds_size, 1);
|
|
memcpy (s->ds_string + s->ds_idx, str, len);
|
|
s->ds_idx += len;
|