about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-10-12 18:26:57 +0000
committerClint Adams <clint@users.sourceforge.net>2008-10-12 18:26:57 +0000
commit4de54f5d00f3da9c0831ab3891b1e4909b930426 (patch)
tree8d54d388373e9141de872f5892e9817481028438
parent89b7eda334a0a20b223f0972b4056c48186082f3 (diff)
downloadzsh-4de54f5d00f3da9c0831ab3891b1e4909b930426.tar.gz
zsh-4de54f5d00f3da9c0831ab3891b1e4909b930426.tar.xz
zsh-4de54f5d00f3da9c0831ab3891b1e4909b930426.zip
25859: avoid possible NULL dereferencing if RC_QUOTES is set.
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_tricky.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d941d9793..54f72723c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-10-12  Clint Adams  <clint@zsh.org>
 
+	* 25859: Src/Zle/zle_tricky.c: avoid possible NULL dereferencing if
+	RC_QUOTES is set.
+
 	* Mikael Magnusson: 25856: Etc/completion-style-guide: typo fixes.
 
 	* Mikael Magnusson: 25855: Etc/zsh-development-guide: typo fixes.
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index bc0152401..dbb01f483 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1235,7 +1235,7 @@ get_comp_string(void)
 	    /* This is done when the lexer reached the word the cursor is on. */
 	    tt = tokstr ? dupstring(tokstr) : NULL;
 
-            if (isset(RCQUOTES)) {
+            if (isset(RCQUOTES) && tt) {
 		char *tt1, *e = tt + zlemetacs - wb;
 		for (tt1 = tt; *tt1; tt1++) {
 		    if (*tt1 == Snull) {