lua-users home
lua-l archive

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


Roberto Ierusalimschy wrote:
>
> > More to the point, is there a way that I can input lines from files
> > with embedded zeroes using io.lines or file:lines?
> 
> No. Lua assumes that "lines" are only meaningful in text files.

Anyway, afaics the code in liolib:read_line accesses out of bound
memory for "\0\n":

    l = strlen(p);
    if (p[l-1] != '\n')

Ciao, ET.