summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2019-11-15 11:55:47 -0500
committerChristopher Michael <cp.michael@samsung.com>2019-11-15 11:55:47 -0500
commit8780f311eaa10d6659bcaa2c9ef490c4e7356866 (patch)
treec47624d5629abd4f251ca40c156c6462d69b2735
parenta1cb493d4f4f1067d8c9080b958891261e0fde84 (diff)
examples: efl_exe: fix out of bounds write
Summary: Buf is 4096 in size and rw_slice.len also evaluates to 4096. Write at the last byte and not over bound instead. CID: 1403895 Reviewers: raster, bu5hm4n, devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10682
-rw-r--r--src/examples/ecore/efl_exe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/examples/ecore/efl_exe.c b/src/examples/ecore/efl_exe.c
index 1458d0630d..eb85eca387 100644
--- a/src/examples/ecore/efl_exe.c
+++ b/src/examples/ecore/efl_exe.c
@@ -21,7 +21,7 @@ _read_change(void *data EINA_UNUSED, const Efl_Event *ev)
21 Eina_Error err = efl_io_reader_read(obj, &rw_slice); 21 Eina_Error err = efl_io_reader_read(obj, &rw_slice);
22 if (!err) 22 if (!err)
23 { 23 {
24 buf[rw_slice.len] = 0; 24 buf[rw_slice.len - 1] = 0;
25 printf("--- READ [%p] [%s] ok %i bytes '%s'\n", obj, efl_core_command_line_command_get(obj), (int)rw_slice.len, buf); 25 printf("--- READ [%p] [%s] ok %i bytes '%s'\n", obj, efl_core_command_line_command_get(obj), (int)rw_slice.len, buf);
26 } 26 }
27 } 27 }