summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-08-22 09:14:50 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2014-08-22 09:14:50 -0700
commit7d2912de049ad6041f3b7c9f813e907c068acae1 (patch)
treecfe9a8f86f0b383ffe1447a85e762e49850b37b9
parentcb468501c91edfec060cd0e771e5173762feb5e4 (diff)
parent33ad7174f6531c1e9052c71609c9084dfb35a2d8 (diff)
downloadzsh-7d2912de049ad6041f3b7c9f813e907c068acae1.tar.gz
zsh-7d2912de049ad6041f3b7c9f813e907c068acae1.tar.xz
zsh-7d2912de049ad6041f3b7c9f813e907c068acae1.zip
Merge branch 'master' of git://git.code.sf.net/p/zsh/code
Conflicts:
	ChangeLog
-rw-r--r--ChangeLog5
-rw-r--r--Src/glob.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 28ddd557a..f5dd2ad9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,11 @@
 	* 33042: NEWS, Src/jobs.c: $? and $pipestatus report 128+signal
 	number for stopped jobs as well as terminated jobs
 
+2014-08-21  Mikael Magnusson  <mikachu@gmail.com>
+
+	* 33038: Src/glob.c: Fix {a..b} expansion hanging when either
+	endpoint is a literal NUL character
+
 2014-08-20  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* Lokesh Mandvekar: 33032: Completion/Linux/Command/_docker,
diff --git a/Src/glob.c b/Src/glob.c
index 627166c7a..cb853870a 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -2219,7 +2219,7 @@ xpandbraces(LinkList list, LinkNode *np)
 	    uremnode(list, node);
 	    strp = str - str3;
 	    lenalloc = strp + strlen(str2+1) + 1;
-	    for (; cend >= cstart; cend--) {
+	    do {
 #ifdef MULTIBYTE_SUPPORT
 		char *ncptr;
 		int nclen;
@@ -2239,7 +2239,7 @@ xpandbraces(LinkList list, LinkNode *np)
 		insertlinknode(list, last, p);
 		if (rev)	/* decreasing:  add in reverse order. */
 		    last = nextnode(last);
-	    }
+	    } while (cend-- > cstart);
 	    *np = nextnode(olast);
 	    return;
 	}