On Fri, 06 Nov 2009 15:16:52 +0100 Luca Olivetti <[email protected]> wrote:
> I know that it seems absurd, and it probably is. > > Short version: > > FindInvalidUTF8Character could access the string beyond its length > since it uses p[1], p[2] and p[3] without properly checking that > those aren't beyond the end of the string. > In the worst case this should cause nothing more than a sigsev, > however here, under circumstances that I cannot determine exactly > (i.e. random), it seems to hang linux hard. > > > Long version: > > I have a (relatively simple) program that has been running flawlessly > 24x7 the last 4 years. >[...] > The most intriguing part is that, under the test conditions, > FindInvalidUTF8Character is only given pure ASCII strings, so it > should never enter the branches where it checks p[1], p[2] or p[3], > so I'm really puzzled. Me too. Nevertheless, I fixed FindInvalidUTF8Character. Mattias -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
