* PATCH: possible null dereference with RC_QUOTES
@ 2008-10-12 15:13 Clint Adams
0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2008-10-12 15:13 UTC (permalink / raw)
To: zsh-workers
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) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-12 15:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-12 15:13 PATCH: possible null dereference with RC_QUOTES Clint Adams
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).