projects
/
contrib
/
mraa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4385a8
)
iio.c: Avoid reading uninitialised memory in cases of error
author
Brendan Le Foll
<brendan.le.foll@intel.com>
Mon, 21 Dec 2015 15:15:51 +0000
(15:15 +0000)
committer
Brendan Le Foll
<brendan.le.foll@intel.com>
Mon, 21 Dec 2015 15:15:51 +0000
(15:15 +0000)
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
src/iio/iio.c
patch
|
blob
|
history
diff --git
a/src/iio/iio.c
b/src/iio/iio.c
index
a9c1ef9
..
cab10fd
100755
(executable)
--- a/
src/iio/iio.c
+++ b/
src/iio/iio.c
@@
-365,6
+365,7
@@
mraa_iio_get_event_data(mraa_iio_context dev)
int curr_bytes = 0;
char shortbuf, signchar;
memset(buf, 0, MAX_SIZE);
+ memset(readbuf, 0, 32);
snprintf(buf, MAX_SIZE, IIO_SYSFS_DEVICE "%d/" IIO_EVENTS, dev->num);
dir = opendir(buf);
if (dir != NULL) {