From: Jean-Philippe Andre Date: Fri, 31 Jul 2015 06:46:08 +0000 (+0900) Subject: eina/btlog: Fix some Coverity issues X-Git-Tag: v1.15.0~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7bfecbdaf2a9cf4ebc73fc35d459ab549bd56313;p=platform%2Fupstream%2Fefl.git eina/btlog: Fix some Coverity issues CID 1297406 CID 1297408 CID 1297409 --- diff --git a/src/bin/eina/eina_btlog.c b/src/bin/eina/eina_btlog.c index 2f46e1e..d3cbf77 100644 --- a/src/bin/eina/eina_btlog.c +++ b/src/bin/eina/eina_btlog.c @@ -66,7 +66,7 @@ path_split(const char *path, char **dir, char **file) return; } *dir = malloc(p - path + 1); - if (!dir) + if (!*dir) { *dir = NULL; *file = NULL; @@ -90,8 +90,8 @@ _addr2line(const char *bin_dir, const char *bin_name, unsigned long long addr, bin_dir, bin_name, addr); p = popen(buf, "r"); if (!p) return EINA_FALSE; - fscanf(p, "%s\n", buf); - if (fscanf(p, "%s\n", func) == 1) + if ((fscanf(p, "%4095s\n", buf) == 1) && + (fscanf(p, "%4095s\n", func) == 1)) { if (fscanf(p, "%[^:]:%i\n", buf, &line) == 2) {