On 04/02/2012 02:50 AM, Enlightenment SVN wrote:
> Log:
> elementary/elm_entry : Fixed a bug. While appending big sized string,
>    elm_entry_entry_get caused segfault because memcpy could be tried with
>    NULL pointer + ">  0" length.
>
>
> Author:       woohyun
> Date:         2012-04-01 17:50:56 -0700 (Sun, 01 Apr 2012)
> New Revision: 69829
> Trac:         http://trac.enlightenment.org/e/changeset/69829
>
> Modified:
>    trunk/elementary/src/lib/elm_entry.c
>
> Modified: trunk/elementary/src/lib/elm_entry.c
> ===================================================================
> --- trunk/elementary/src/lib/elm_entry.c      2012-04-01 17:58:47 UTC (rev 
> 69828)
> +++ trunk/elementary/src/lib/elm_entry.c      2012-04-02 00:50:56 UTC (rev 
> 69829)
> @@ -2349,7 +2349,8 @@
>                return NULL;
>             }
>           memcpy(tmpbuf, text, tlen);
> -        memcpy(tmpbuf + tlen, wd->append_text_left, wd->append_text_len);
> +        if (wd->append_text_left)
> +          memcpy(tmpbuf + tlen, wd->append_text_left, 
> strlen(wd->append_text_len));

strlen() on an int?

>           tmpbuf[tlen + wd->append_text_len] = '\0';
>           eina_stringshare_replace(&wd->text, tmpbuf);
>           free(tmpbuf);

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to