On Mon, 2 Apr 2012 15:22:22 +0900 Daniel Juyung Seo <[email protected]> said:

actually it should not use strlen() there at all. the fix in svn was even
"bad" (though wouldnt have segv'd)

> This is wrong.
> 
> Daniel Juyung Seo (SeoZ)
> 
> On Mon, Apr 2, 2012 at 3:20 PM, Sebastian Dransfeld <[email protected]>
> wrote:
> > 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
> 
> ------------------------------------------------------------------------------
> 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
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [email protected]


------------------------------------------------------------------------------
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