[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] getaline()

Mike Castle <dalgoda@xxxxxxxxxxxxx> writes:

> Ok,  I think getaline() in miscutil.c is wrong about something.
> Consider the following line I added:
>     while ((p=fgets(buf+len, size-len, f)) != NULL) {
>         len += strlen(buf+len);
>         if (len > 0 && ( buf[len-1] == '\n' || len < size-1 ) )
>             break;          /* the whole line has been read */
>         size += size+100;
> +       fprintf(stderr, "getaline:size=%ld\n", (long)size);
>         buf = critrealloc(buf, size, "reading line" );
>     }

Heck. I think I fixed that one in 1.9.2-ma or 1.9.4-ma some time back, I
don't recall exactly. 

Cornelius, could you have a look into that if you missed a patch at that
time or if you had a subsequent patch that backed my changes out? 

I think it's a problem in dealing with "strange" line termination
characters such as 0 characters or possibly \r alone. 

Matthias Andree

                Where do you think you're going today?

leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list