Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: possible null dereference with RC_QUOTES
- X-seq: zsh-workers 25859
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: possible null dereference with RC_QUOTES
- Date: Sun, 12 Oct 2008 15:13:44 +0000
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
If tokstr can be NULL, then we don't want to try the *tt1 below.
Index: Src/Zle/zle_tricky.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_tricky.c,v
retrieving revision 1.96
diff -u -r1.96 zle_tricky.c
--- Src/Zle/zle_tricky.c 8 Sep 2008 22:18:03 -0000 1.96
+++ Src/Zle/zle_tricky.c 12 Oct 2008 15:12:25 -0000
@@ -1235,7 +1235,7 @@
/* 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) {
Messages sorted by:
Reverse Date,
Date,
Thread,
Author