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:
a8102e8
)
dtmail/DtMailRc.C: coverity CID 88975; use after free
author
Jon Trulson
<jon@radscan.com>
Sat, 31 Mar 2018 23:46:53 +0000
(17:46 -0600)
committer
Jon Trulson
<jon@radscan.com>
Sat, 31 Mar 2018 23:46:53 +0000
(17:46 -0600)
cde/programs/dtmail/libDtMail/Common/DtMailRc.C
patch
|
blob
|
history
diff --git
a/cde/programs/dtmail/libDtMail/Common/DtMailRc.C
b/cde/programs/dtmail/libDtMail/Common/DtMailRc.C
index f251fa5b54a4d13b3e366e118edaea1736a99f16..14df67bd901042323a58502f5944e98c3e9d4c63 100644
(file)
--- a/
cde/programs/dtmail/libDtMail/Common/DtMailRc.C
+++ b/
cde/programs/dtmail/libDtMail/Common/DtMailRc.C
@@
-2015,6
+2015,7
@@
DtMail::MailRc::expand(char *name)
register char *cp, *Shell;
int s, pivec[2];
struct stat sbuf;
+ char *retchr = NULL;
if (name[0] == '+' && getfolderdir(cmdbuf) >= 0) {
sprintf(xname, "%s/%s", cmdbuf, name + 1);
@@
-2084,9
+2085,10
@@
DtMail::MailRc::expand(char *name)
goto err;
}
+ retchr = strdup(xname);
delete [] xname;
delete [] cmdbuf;
- return(
strdup(xname)
);
+ return(
retchr
);
err:
fflush(stderr);