From f5354453e0e8bc3ed6d692aba4f5681562f1aa69 Mon Sep 17 00:00:00 2001 From: aCaB Date: Sat, 6 Oct 2007 11:37:44 +0000 Subject: [PATCH] check return value of gentemp() git-svn: trunk@3276 --- ChangeLog | 4 ++++ libclamav/nsis/nulsft.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cca7a1e56..425493cd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Oct 6 12:36:13 CEST 2007 (acab) +------------------------------------ + * libclamav/nsis/nulsft.c: check return value of gentemp() + Sat Oct 6 10:47:26 EEST 2007 (edwin) ------------------------------------ * libclamav/phish*.[ch], regex_list.c, rtf.c: fix some warnings diff --git a/libclamav/nsis/nulsft.c b/libclamav/nsis/nulsft.c index fc2624030..55af47592 100644 --- a/libclamav/nsis/nulsft.c +++ b/libclamav/nsis/nulsft.c @@ -492,7 +492,8 @@ int cli_scannulsft(int desc, cli_ctx *ctx, off_t offset) { nsist.ifd = desc; nsist.off = offset; - nsist.dir = cli_gentemp(NULL); + if (!(nsist.dir = cli_gentemp(NULL))) + return CL_ETMPDIR; if(mkdir(nsist.dir, 0700)) { cli_dbgmsg("NSIS: Can't create temporary directory %s\n", nsist.dir); free(nsist.dir);