mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dthelp/FormatUtils: fix coredump in dthelpgen due to free() of a bad address
This commit is contained in:
parent
88cbe518a4
commit
f4e3cb8327
1 changed files with 2 additions and 4 deletions
|
@ -583,13 +583,11 @@ _DtHelpGetNxtToken (
|
|||
/* Str is pointing at the start of the next token. Depending on the
|
||||
type of token, malloc the memory and copy the token value. */
|
||||
if (*str == '\0')
|
||||
token = str;
|
||||
|
||||
token = strdup(str);
|
||||
else if (*str == '\n') {
|
||||
token = str;
|
||||
token = strdup(str);
|
||||
str++;
|
||||
}
|
||||
|
||||
else {
|
||||
/* We have some non-whitespace characters. Find the end of */
|
||||
/* them and copy them into new memory. */
|
||||
|
|
Loading…
Reference in a new issue