References: bnc#755136 Revert upstream commit e0f707523cab26f74ec23f4a20a27add8702ed5b. --- patch-2.6.1.136-31a7.orig/src/pch.c +++ patch-2.6.1.136-31a7/src/pch.c @@ -379,18 +379,11 @@ skip_hex_digits (char const *str) static bool name_is_valid (char const *name) { - static char const *bad[2]; - char const *n; - - if (bad[0] && ! strcmp (bad[0], name)) - return false; - if (bad[1] && ! strcmp (bad[1], name)) - return false; + const char *n = name; if (IS_ABSOLUTE_FILE_NAME (name)) { say ("Ignoring potentially dangerous file name %s\n", quotearg (name)); - bad[!! bad[0]] = name; return false; } for (n = name; *n; ) @@ -398,7 +391,6 @@ name_is_valid (char const *name) if (*n == '.' && *++n == '.' && ( ! *++n || ISSLASH (*n))) { say ("Ignoring potentially dangerous file name %s\n", quotearg (name)); - bad[!! bad[0]] = name; return false; } while (*n && ! ISSLASH (*n)) --- patch-2.6.1.136-31a7.orig/tests/bad-filenames +++ patch-2.6.1.136-31a7/tests/bad-filenames @@ -114,27 +114,3 @@ echo 1 > g check 'patch -f -p1 --dry-run < d.diff || echo status: $?' < d.diff <