jaehyun pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=0c15bde2191172b0f2d5570674f50cdccee1f544

commit 0c15bde2191172b0f2d5570674f50cdccee1f544
Author: Jaehyun Cho <jae_hyun....@samsung.com>
Date:   Fri Jan 22 21:17:19 2016 +0900

    edc_parser: Fix to allocate correct size of memory for string.
    
    Allocate one more char memory for the last null character of the string.
    This commit fixes the commit 335575eb84a87e38ee1ef4ff16673d5336ab6fdf.
---
 src/lib/edc_parser.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/edc_parser.c b/src/lib/edc_parser.c
index 3361a62..f326aad 100644
--- a/src/lib/edc_parser.c
+++ b/src/lib/edc_parser.c
@@ -95,7 +95,8 @@ double_quotation_marks_remove(const char *str)
      }
 
    new_len = len - cnt;
-   new_str = (char *) calloc(new_len * sizeof(char), 1);
+   //Allocate one more char for last null character
+   new_str = (char *) calloc((new_len + 1) * sizeof(char), 1);
    j = 0;
    for (i = 0; i < len; i++)
      {

-- 


Reply via email to