summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-15 19:17:35 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-08-15 19:17:35 +0100
commita84cfbae7209fd9743b5521d2635b1af72e498d9 (patch)
treee72244fd5aab4d7cd62976f97f8fa4adf1842f9b
parentc3c903b9ccbaab4226da471add7add013f5c709d (diff)
ethumb - fix short alloc on stack not including nul char space
fix space for nul byte with alloca.
-rw-r--r--src/lib/ethumb/ethumb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ethumb/ethumb.c b/src/lib/ethumb/ethumb.c
index 00edfd5bed..38552bfad3 100644
--- a/src/lib/ethumb/ethumb.c
+++ b/src/lib/ethumb/ethumb.c
@@ -911,7 +911,7 @@ _ethumb_generate_hash(const char *file)
911 { 911 {
912 char *tmp; 912 char *tmp;
913 913
914 tmp = alloca(length); 914 tmp = alloca(length + 1);
915 length = getxattr(file, "user.e.md5", tmp, length); 915 length = getxattr(file, "user.e.md5", tmp, length);
916 916
917 /* check if we have at least something that look like a md5 hash */ 917 /* check if we have at least something that look like a md5 hash */