projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8906867
)
eina file: Fix rare crash in line iteration
author
Jean-Philippe Andre
<jp.andre@samsung.com>
Mon, 3 Jul 2017 07:22:01 +0000
(16:22 +0900)
committer
Jean-Philippe Andre
<jp.andre@samsung.com>
Mon, 3 Jul 2017 07:23:40 +0000
(16:23 +0900)
I'm not sure about the rest of this code, so it's possible that
the index is increased even if it shouldn't. But I've observed
a crash at this line, apparently when reaching the end pointer.
src/lib/eina/eina_file_common.c
patch
|
blob
|
history
diff --git
a/src/lib/eina/eina_file_common.c
b/src/lib/eina/eina_file_common.c
index
4b94d1d
..
8d7472b
100644
(file)
--- a/
src/lib/eina/eina_file_common.c
+++ b/
src/lib/eina/eina_file_common.c
@@
-606,8
+606,8
@@
_eina_file_map_lines_iterator_next(Eina_Lines_Iterator *it, void **data)
match = *it->current.end;
if (it->current.index > 0)
it->current.end++;
- while (
(*it->current.end == '\n' || *it->current.end == '\r')
-
&& it->current.end < it->end
)
+ while (
it->current.end < it->end &&
+
(*it->current.end == '\n' || *it->current.end == '\r')
)
{
if (match == *it->current.end)
break;