summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-07-07 18:13:39 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-07-07 18:13:39 +0200
commit259d262d39927203829fac0bbc05bd3772c01643 (patch)
treeee3b4f31b32fd321b485d1ec05f319aad77a0c14 /src
parent037d7420cd2d553be2b2917d0f81ebac71b7ba07 (diff)
wgtpkg-install: Fix SEGV when no icon in config fileflounder_5.99.2flounder/5.99.25.99.2
Bug-AGL: SPEC-1573 Change-Id: I891c4edc3a7ded7848fe11cbc3ce3fe429650bf8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r--src/wgtpkg-install.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wgtpkg-install.c b/src/wgtpkg-install.c
index 9642c93..505b915 100644
--- a/src/wgtpkg-install.c
+++ b/src/wgtpkg-install.c
@@ -458,7 +458,7 @@ static int install_security(const struct wgt_desc *desc)
len--;
*head++ = '/';
icon = desc->icons ? desc->icons->src : NULL;
- lic = (unsigned)strlen(icon);
+ lic = (unsigned)(icon ? strlen(icon) : 0);
n = file_count();
i = 0;
while(i < n) {