Why not happens?? 1. because eina_simple_xml_parse uses char *, buf should be null terminated. So I use memset. 2. Because NULL is needed at the end, I add one more byte. fread read exact bytes and has no NULL. 3. If buf is failed to alloc (very rarely case), it is not need to be rewinded.
PS. I found more cases in the map code and I fixed patch again. 2013/2/21 Tom Hacohen <[email protected]>: > On 21/02/13 09:48, Bluezery wrote: >> >> Hello, >> >> This patch fix 1byte invalid read error for char * string. >> Readed bytes needs one more bytes for NULL terminated char. > > > It's not really something that will ever happen so we'll never encounter it > in real life, but still: > You've included unrelated changes in this patch. You've changed fseek to > rewind and moved it inside the if, which means it'll get called under > different circumstances now. > > -- > Tom. > > -- BRs, Kim.
map@fix_1byte_error.patch
Description: Binary data
------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
