projects
/
oweals
/
cde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88cbe51
)
dthelp/FormatUtils: fix coredump in dthelpgen due to free() of a bad address
author
Jon Trulson
<jon@radscan.com>
Tue, 10 Apr 2018 22:30:25 +0000
(16:30 -0600)
committer
Jon Trulson
<jon@radscan.com>
Tue, 10 Apr 2018 22:30:25 +0000
(16:30 -0600)
cde/lib/DtHelp/FormatUtil.c
patch
|
blob
|
history
diff --git
a/cde/lib/DtHelp/FormatUtil.c
b/cde/lib/DtHelp/FormatUtil.c
index 21543d21012b355699778cb45ab6fd541a75b451..e55e158d49a33c3a153c6948bf56b556657f3cd7 100644
(file)
--- a/
cde/lib/DtHelp/FormatUtil.c
+++ b/
cde/lib/DtHelp/FormatUtil.c
@@
-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 = str
dup(str)
;
str++;
}
-
else {
/* We have some non-whitespace characters. Find the end of */
/* them and copy them into new memory. */