On Wed, 16 Feb 2011, Enlightenment SVN wrote:
> Log: > Eina utf8: Handle overlong representations in the parser. maybe adding a unit test for that bug ? Vincent > > Author: tasn > Date: 2011-02-16 23:53:49 -0800 (Wed, 16 Feb 2011) > New Revision: 57112 > Trac: http://trac.enlightenment.org/e/changeset/57112 > > Modified: > trunk/eina/src/lib/eina_unicode.c > > Modified: trunk/eina/src/lib/eina_unicode.c > =================================================================== > --- trunk/eina/src/lib/eina_unicode.c 2011-02-17 07:44:51 UTC (rev 57111) > +++ trunk/eina/src/lib/eina_unicode.c 2011-02-17 07:53:49 UTC (rev 57112) > @@ -230,7 +230,7 @@ > if (((d = buf[ind++]) == 0) || IS_INVALID_BYTE(d) || > !IS_CONTINUATION_BYTE(d)) goto error; > r |= (d & 0x3f); > - if (!r) goto error; > + if (r <= 0x7F) goto error; > *iindex = ind; > return r; > } > @@ -243,7 +243,7 @@ > if (((d = buf[ind++]) == 0) || IS_INVALID_BYTE(d) || > !IS_CONTINUATION_BYTE(d)) goto error; > r |= (d & 0x3f); > - if (!r) goto error; > + if (r <= 0x7FF) goto error; > *iindex = ind; > return r; > } > @@ -259,7 +259,7 @@ > if (((d = buf[ind++]) == 0) || IS_INVALID_BYTE(d) || > !IS_CONTINUATION_BYTE(d)) goto error; > r |= (d & 0x3f); > - if (!r) goto error; > + if (r <= 0xFFFF) goto error; > *iindex = ind; > return r; > } > @@ -278,7 +278,7 @@ > if (((d = buf[ind++]) == 0) || IS_INVALID_BYTE(d) || > !IS_CONTINUATION_BYTE(d)) goto error; > r |= (d & 0x3f); > - if (!r) goto error; > + if (r <= 0x1FFFFF) goto error; > *iindex = ind; > return r; > } > @@ -300,7 +300,7 @@ > if (((d = buf[ind++]) == 0) || IS_INVALID_BYTE(d) || > !IS_CONTINUATION_BYTE(d)) goto error; > r |= (d & 0x3f); > - if (!r) goto error; > + if (r <= 0x3FFFFFF) goto error; > *iindex = ind; > return r; > } > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > enlightenment-svn mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > > ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
