From: Carsten H. (T. R. <ra...@ra...> - 2012-04-13 10:20:24
|
On Fri, 13 Apr 2012 14:01:02 +0900 Minseok Kim <min...@sa...> said: misleading as its actual image data - no extra byte needed. i removed it. added comment. > I have a question. > > ----elm_cnp.c : 418 > ---------------------------------------------------------------------------- > ------------------- > > if (format == ELM_SEL_FORMAT_IMAGE) > { > sel->selbuf = malloc(buflen+1); > memcpy(sel->selbuf, selbuf, buflen); > } > > ---------------------------------------------------------------------------- > --------------------------------------- > > This code allocates buffer with 'buflen+1' and copy. > But there is no code to add last '\0' character. > > Is there no problem? > I think it need to set last '\0' character(or need to use calloc) > > Please answer me. > > Thanks. > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > enlightenment-devel mailing list > enl...@li... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ra...@ra... |