ecore_file - fix nasty memory issues in ecore_file_app_exe_get()
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 1 Apr 2015 00:30:13 +0000 (09:30 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 1 Apr 2015 00:37:27 +0000 (09:37 +0900)
commit4e716fb779a3e02d11f3300f05879f86b0a73e62
tree55a67ec87f15dc6f507ff75d163940c098e56a50
parentabf3c3c4704f67db41c8ed230510bbaa2386cc42
ecore_file - fix nasty memory issues in ecore_file_app_exe_get()

valgrind was most unhappy with ecore_file_app_exe_get(). like:

==8331== Invalid write of size 1
==8331==    at 0x68DE90A: ecore_file_app_exe_get (ecore_file.c:994)
==8331==  Address 0x1348e58f is 0 bytes after a block of size 31 alloc'd
==8331==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
==8331== Invalid write of size 1
==8331==    at 0x68DE948: ecore_file_app_exe_get (ecore_file.c:1000)
==8331==  Address 0x1348e599 is 10 bytes after a block of size 31 alloc'd
==8331==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)

etc. etc. - so i rewrote it cleanly using strbuf to save code and
effort. cleaner now and ACTUALLY works correctly... and no valgrind
complaints.

@fix
src/lib/ecore_file/ecore_file.c