Just a question do we want to clear cfgbuf here, before calling
pxelinux_load_parse_cfg?
That's theoretically not necessary. The buffer either gets populated
with data, or the function errors out. The code also makes sure that
there is a final NUL-character in the buffer:
https://github.com/aik/SLOF/blob/64c526a/lib/libnet/pxelinux.c#L169
... but I think I've got to double check that there is also a
NUL-character immediately at the end of the downloaded data ... so
there's indeed a change required, but likely rather in the SLOF code
than here.
Thomas