summaryrefslogtreecommitdiffstats
path: root/source/xap/rxvt-unicode/CVE-2022-4170.diff
blob: 95edd122130d71215627c156500190f994e9a4ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
--- ./src/perl/background.orig	2021-05-09 10:04:44.000000000 -0500
+++ ./src/perl/background	2023-01-03 13:53:59.865031717 -0600
@@ -1451,8 +1451,7 @@
 # any code execution or other shenanigans. does not
 # support binary NULs in string.
 sub q0 {
-   (my $str = shift) =~ s/\x00//g; # make sure there really aren't any embedded NULs
-   "q\x00$str\x00"
+   "qq\x00\Q$_[0]\E\x00"
 }
 
 sub old_bg_expr {