[syslinux] [PATCH] pxe: fix OACK packet handling

Sebastian Herbszt herbszt at gmx.de
Sat Aug 8 08:32:45 PDT 2009


liu Aleaxander wrote:
>> The old code did only covert the first option tho. We can use strncasecmp() instead of strncmp().
> Well, in fact , the old code did convert all the options to low-case. And of course yes, the strncasecmp will do work.

The code i was writing about is:

        dst = src = options;
        while (buffersize--) {
            if (*src == 0)
                break;          /* found a final null */
            *dst++ = *src++ | 0x20;
            if (!buffersize)
                goto done;  /* found no final null */
        }

options could be "tsize<NULL>1234<NULL>blksize<NULL>2345<NULL>".
Unless i mistake this, the code will convert until the first <NULL> and then will exit the
while loop.

- Sebastian




More information about the Syslinux mailing list