Looks strange also.


in normal case.
it should be memcpy(sel->selbuf, selbuf, buflen+1);
or just use strcpy.


-----Original Message-----
From: "Minseok Kim"<[email protected]> 
To: <[email protected]>; 
Cc: 
Sent: 2012-04-13 (금) 14:01:02
Subject: [E-devel] question about elm_cnp_selection_set in elm_cnp

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to