summaryrefslogtreecommitdiff
path: root/libarchive/archive_util.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2012-07-27 08:24:12 +0000
committerMartin Matuska <mm@FreeBSD.org>2012-07-27 08:24:12 +0000
commit81418b36c02b6434acd4b8ae4cfb8c80a3742fd4 (patch)
tree4b551422581ae9a8093415e07c619e2a59ef6a7b /libarchive/archive_util.c
parent132160f77407d2174d2bec0a8ba9c6eefc4429d7 (diff)
Diffstat (limited to 'libarchive/archive_util.c')
-rw-r--r--libarchive/archive_util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libarchive/archive_util.c b/libarchive/archive_util.c
index e0852a3b58ba0..103c009d5bc8c 100644
--- a/libarchive/archive_util.c
+++ b/libarchive/archive_util.c
@@ -243,8 +243,9 @@ __archive_mktemp(const char *tmpdir)
archive_wstrcpy(&temp_name, tmp);
free(tmp);
} else {
- archive_wstring_append_from_mbs(&temp_name, tmpdir,
- strlen(tmpdir));
+ if (archive_wstring_append_from_mbs(&temp_name, tmpdir,
+ strlen(tmpdir)) < 0)
+ goto exit_tmpfile;
if (temp_name.s[temp_name.length-1] != L'/')
archive_wstrappend_wchar(&temp_name, L'/');
}