projects
/
platform
/
core
/
security
/
yaca.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95c02cc
)
Prevent use of uninitialized variable in examples
78/69478/1
author
Krzysztof Jackiewicz
<k.jackiewicz@samsung.com>
Fri, 13 May 2016 10:31:01 +0000
(12:31 +0200)
committer
Krzysztof Jackiewicz
<k.jackiewicz@samsung.com>
Fri, 13 May 2016 10:32:03 +0000
(12:32 +0200)
Change-Id: I79052b160cd3d009fe89652a33e0450ee1e516d3
examples/misc.c
patch
|
blob
|
history
diff --git
a/examples/misc.c
b/examples/misc.c
index b3a8fdced21922234114c9983af601c881220678..ef8c53cdfc690119bbde6dcb139a19d0e6e99214 100644
(file)
--- a/
examples/misc.c
+++ b/
examples/misc.c
@@
-54,7
+54,7
@@
int read_file(const char *path, char **data, size_t *data_len)
int ret;
char tmp[BUF_SIZE];
char *buf = NULL;
- size_t buf_len;
+ size_t buf_len
= 0
;
FILE *f;
f = fopen(path, "r");
@@
-71,7
+71,6
@@
int read_file(const char *path, char **data, size_t *data_len)
ret = -1;
break;
}
- buf_len = 0;
} else {
char *new_buf = yaca_realloc(buf, buf_len + read);
if (new_buf == NULL) {