#3824: [PATCH] Unitialised variable
----------------------+----------------------
Reporter: flatcap | Owner: mutt-dev
Type: defect | Status: new
Priority: major | Milestone:
Component: build | Version: 1.5.24
Resolution: | Keywords: patch
----------------------+----------------------
Comment (by tamo):
I don't think we need your patch.
Maybe you counted "&" or "*" wrongly, didn't you?
Do you understand the difference between the first call (s,&sp) and the
others (NULL,&sp)?
The first one doesn't use the value of sp but sets the pointer for later
use.
https://dev.mutt.org/trac/browser/parse.c#L894 says "call back with NULL
for more (like strtok)."
{{{
901 if (s)
902 p = s;
...
908 for (s = NULL, o = NULL, onull = NULL;
909 (p = strpbrk (p, "<> \t;")) != NULL; ++p)
910 {
...
921 if (*p == '>')
922 {
...
929 if (saveptr)
930 *saveptr = p + 1; /* next call starts after '>' */
931 return ret;
932 }
}}}
--
Ticket URL: <https://dev.mutt.org/trac/ticket/3824#comment:1>
Mutt <http://www.mutt.org/>
The Mutt mail user agent