summaryrefslogtreecommitdiffstats
path: root/src/wgtpkg-files.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-01-26 21:13:11 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2017-01-26 21:13:11 +0100
commit9680a57f258d4118416104c224153a0292b7328e (patch)
tree5a4dc0d7268e082dbc300b91e1fa3be726593f13 /src/wgtpkg-files.c
parenta85c80f25325c69579f3b6c6df847d631e68d0b5 (diff)
Fix a possible access to uninitialized memory
Change-Id: Ica1cf7d81b561ce34039e5212ed6578950f1bfdd Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/wgtpkg-files.c')
-rw-r--r--src/wgtpkg-files.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wgtpkg-files.c b/src/wgtpkg-files.c
index 503a84b..cce6a04 100644
--- a/src/wgtpkg-files.c
+++ b/src/wgtpkg-files.c
@@ -50,7 +50,7 @@ static unsigned int what_signature(const char *name)
return UINT_MAX;
len = sizeof(distributor_file_prefix)-1;
- if (memcmp(name, distributor_file_prefix, len))
+ if (strncmp(name, distributor_file_prefix, len))
return 0;
if (name[len] <= '0' || name[len] > '9')
return 0;