summary refs log tree commit diff
diff options
context:
space:
mode:
authorWieland Hoffmann <themineo@gmail.com>2015-08-13 15:53:12 +0200
committerOliver Kiddle <opk@zsh.org>2015-08-13 15:53:12 +0200
commit8e0b5e0e009271a7a9fc371e7278e9d9de22cfb3 (patch)
tree21a14dab87633e11b235a6c8b9a74e3345f9cb29
parent51d2c663414a5bacd70404a592572560a1021bcb (diff)
downloadzsh-8e0b5e0e009271a7a9fc371e7278e9d9de22cfb3.tar.gz
zsh-8e0b5e0e009271a7a9fc371e7278e9d9de22cfb3.tar.xz
zsh-8e0b5e0e009271a7a9fc371e7278e9d9de22cfb3.zip
Wieland Hoffmann: 36123: protect against word splitting in __git_is_committish_range
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_git4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c7444164b..1c847dbbc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-13  Oliver Kiddle <opk@zsh.org>
+
+	* Wieland Hoffmann: 36123: Completion/Unix/Command/_git:
+	protect against word splitting in __git_is_committish_range
+
 2015-08-12  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* Kamil Dudka: 36106: Src/Zle/zle_keymap.c: fix const parameter.
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index a5e44641b..92db67928 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -4973,8 +4973,8 @@ __git_is_treeish () {
 (( $+functions[__git_is_committish_range] )) ||
 __git_is_committish_range () {
   [[ $1 == *..(.|)* ]] || return 1
-  local first=$(__git_committish_range_first $1)
-  local last=$(__git_committish_range_last $1)
+  local first="$(__git_committish_range_first $1)"
+  local last="$(__git_committish_range_last $1)"
   [[ $first != *..* && $last != *..* ]] && \
     __git_is_committish $first && \
     __git_is_committish $last