[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xlog-discussion] NULL pointer deref in in xlog 0.9.6
From: |
Nigel Horne |
Subject: |
Re: [Xlog-discussion] NULL pointer deref in in xlog 0.9.6 |
Date: |
Thu, 3 Jun 2004 04:41:31 +0100 |
User-agent: |
KMail/1.6.2 |
It may be that my fix is a bit too drastic and could prevent the last line from
being handled.
Maybe this would be better:
while (!feof (fp))
{
while (ch != 10)
{
ch = fgetc (fp);
if (ch == EOF) break;
buf[ichar++] = ch;
}
+ if(feof(fp) && (ichar == 0)) /* address@hidden */
+ break;
buf[ichar] = '\0';
ichar = 0;
ch = 0;
-Nigel G0LOV
--
Nigel Horne. Arranger, Composer, Typesetter.
NJH Music, Barnsley, UK. ICQ#20252325
address@hidden http://www.bandsman.co.uk