summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStefan Bolte <sbolte@lavabit.com>2013-05-15 16:28:20 +0200
committerStefan Bolte <sbolte@lavabit.com>2013-05-15 16:28:20 +0200
commit08f377719611c4782a165b1398aa6fb01d59eabc (patch)
tree104ba96b2fc7ff89c9fd7f9c6a9f21b1e29bc5e6 /tools
parent79a886123ad7405692b35665f952ec211c90db67 (diff)
downloaddwb-08f377719611c4782a165b1398aa6fb01d59eabc.zip
Null terminate string when unpacking
Diffstat (limited to 'tools')
-rw-r--r--tools/exar/exar.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/exar/exar.c b/tools/exar/exar.c
index b5773b01..b9ea9379 100644
--- a/tools/exar/exar.c
+++ b/tools/exar/exar.c
@@ -198,6 +198,8 @@ exar_unpack(const char *path, const char *dest)
break;
if (fread(size, 1, SZ_SIZE, f) != SZ_SIZE)
break;
+ name[SZ_NAME-1] = 0;
+ size[SZ_SIZE-1] = 0;
if (flag != DIR_FLAG && flag != FILE_FLAG)
{
LOG(1, "No file flag found for %s\n", name);