From ed5c01209deb62b5a054217601d2048666c7a478 Mon Sep 17 00:00:00 2001 From: taehyub Date: Mon, 7 Mar 2016 20:44:23 +0900 Subject: [PATCH] edc_parser: check null for code safety Summary: check null for code safety @fix Reviewers: Jaehyun_Cho, NikaWhite, Hermet Reviewed By: Hermet Differential Revision: https://phab.enlightenment.org/D3776 --- src/lib/edc_parser.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/edc_parser.c b/src/lib/edc_parser.c index ae042bb..7f25adc 100644 --- a/src/lib/edc_parser.c +++ b/src/lib/edc_parser.c @@ -543,7 +543,7 @@ cur_state_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED) while (temp_pos && (temp_pos < name_end)) { space_pos = temp_pos; - temp_pos++; + if (++temp_pos) break; temp_pos = strchr(temp_pos, ' '); } @@ -552,7 +552,6 @@ cur_state_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED) while (temp_pos && (temp_pos < name_end)) { tab_pos = temp_pos; - temp_pos++; temp_pos = strchr(p, '\t'); }