File: CVE-2014-7169.dpatch

package info (click to toggle)
bash 4.1-3%2Bdeb6u2
  • links: PTS
  • area: main
  • in suites: squeeze-lts
  • size: 3,128 kB
  • ctags: 161
  • sloc: sh: 1,895; ansic: 854; makefile: 483
file content (30 lines) | stat: -rw-r--r-- 714 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /bin/sh -e

if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
elif [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch) patch $pdir -f --no-backup-if-mismatch -p2 < $0;;
    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p2 < $0;;
    *)
	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
	exit 1
esac
exit 0

# DP: Fix CVE-2014-7169.

--- a/bash/parse.y
+++ b/bash/parse.y
@@ -2848,6 +2848,8 @@ reset_parser ()
   FREE (word_desc_to_read);
   word_desc_to_read = (WORD_DESC *)NULL;
 
+  eol_ungetc_lookahead = 0;
+
   current_token = '\n';		/* XXX */
   last_read_token = '\n';
   token_to_read = '\n';