summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-07-31 15:46:08 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-08-03 12:27:21 +0900
commit7bfecbdaf2a9cf4ebc73fc35d459ab549bd56313 (patch)
treeeffa713fbac0e2b5e144563c6f0db42a318fc2d6
parentbddce0b65047cdd6a9a32fbd05643bb27411f673 (diff)
eina/btlog: Fix some Coverity issues
CID 1297406 CID 1297408 CID 1297409
-rw-r--r--src/bin/eina/eina_btlog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/eina/eina_btlog.c b/src/bin/eina/eina_btlog.c
index 2f46e1eff7..d3cbf77c5c 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)
66 return; 66 return;
67 } 67 }
68 *dir = malloc(p - path + 1); 68 *dir = malloc(p - path + 1);
69 if (!dir) 69 if (!*dir)
70 { 70 {
71 *dir = NULL; 71 *dir = NULL;
72 *file = NULL; 72 *file = NULL;
@@ -90,8 +90,8 @@ _addr2line(const char *bin_dir, const char *bin_name, unsigned long long addr,
90 bin_dir, bin_name, addr); 90 bin_dir, bin_name, addr);
91 p = popen(buf, "r"); 91 p = popen(buf, "r");
92 if (!p) return EINA_FALSE; 92 if (!p) return EINA_FALSE;
93 fscanf(p, "%s\n", buf); 93 if ((fscanf(p, "%4095s\n", buf) == 1) &&
94 if (fscanf(p, "%s\n", func) == 1) 94 (fscanf(p, "%4095s\n", func) == 1))
95 { 95 {
96 if (fscanf(p, "%[^:]:%i\n", buf, &line) == 2) 96 if (fscanf(p, "%[^:]:%i\n", buf, &line) == 2)
97 { 97 {