[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] infinite loop converting to UCS2
From: |
Bastien Nocera |
Subject: |
Re: [PATCH] infinite loop converting to UCS2 |
Date: |
Thu, 28 Jul 2005 10:24:30 +0100 |
On Thu, 2005-07-28 at 11:22 +0200, Pawel Kot wrote:
> Hi Bastien,
>
> 2005/7/28, Bastien Nocera <address@hidden>:
> > On Thu, 2005-07-28 at 01:31 +0200, Pawel Kot wrote:
> > > Hi,
> > >
> > > 2005/7/27, Bastien Nocera <address@hidden>:
> > > > There's an infinite loop in char_ucs2_encode(), it doesn't exit when
> > > > reaching the null-character at the end of the string. It could also lead
> > > > to memory corruption, and eventually crashes.
> > >
> > > That's right. but why not make it case 0: in the switch?
> >
> > Because "break" would break out of the switch statement, not the for
> > loop :)
>
> case 0:
> return;
> ?
Yeah, that works as well...
---
Bastien Nocera <address@hidden>
"At last England have appointed a manager who speaks English better than
the players" - Brian Clough, on the appointment of Sven-Goran Eriksson.