summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-01-16 20:35:29 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-01-16 20:35:29 +0000
commit4f9ee790e0d9f0b3915c2769e0e48c6a7cd8f353 (patch)
treede3e8d76c30ce9a5382940368ba4238f295ba542
parent53da3d57252d68367ebcc7eec00d2db9256747f7 (diff)
downloadzsh-4f9ee790e0d9f0b3915c2769e0e48c6a7cd8f353.tar.gz
zsh-4f9ee790e0d9f0b3915c2769e0e48c6a7cd8f353.tar.xz
zsh-4f9ee790e0d9f0b3915c2769e0e48c6a7cd8f353.zip
28630: Ricky Zhou: fix crash with isident()
28634: add test
-rw-r--r--ChangeLog15
-rw-r--r--Src/params.c2
-rw-r--r--Test/D04parameter.ztst4
3 files changed, 20 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ba76959a..15c9579db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-16  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 28634: Test/D04parameter.ztst: test for 28630.
+
+	* Ricky Zhou: 28630: Src/params.c: fix crash with isident.
+
+	* gi1242+zsh@gmail.com: 28629: Completion/Unix/Command/.distfiles,
+	Completion/Unix/Command/_lp, Completion/Unix/Command/_tex,
+	Completion/Unix/Command/_xournal,
+	Completion/Unix/Type/.distfiles, Completion/Unix/Type/_tex,
+	Completion/X/Command/.distfiles, Completion/X/Command/_xournal:
+	completion updates.
+
 2011-01-16  Clint Adams  <clint@zsh.org>
 
 	* unposted: Completion/Unix/Command/_fuser: fix typo in pattern
@@ -14114,5 +14127,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5183 $
+* $Revision: 1.5184 $
 *****************************************************
diff --git a/Src/params.c b/Src/params.c
index 8510b92dc..ba6cd6365 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -1009,6 +1009,8 @@ isident(char *s)
      * definitely not a valid identifier.         */
     if (!*ss)
 	return 1;
+    if (s == ss)
+	return 0;
     if (*ss != '[')
 	return 0;
 
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index 8ba08b29c..b708b4bd2 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -1401,3 +1401,7 @@
 >a
 >b
 >c
+
+   printf "%n" '[0]'
+1:Regression test for identifier test
+?(eval):1: not an identifier: [0]