lua-users home
lua-l archive

Re: Why does LoadString return NULL for zero-length strings?

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


> Obviously, the only time there should be a string constant in a binary
> chunk of length 0 is when someone is being malicious.
ldump.c outputs NULL for source strings when stripping debug info or
when it's the same as that of its parent function.
> As it stands, putting a zero length string constant into a binary
> chunk causes a segfault: (http://codepad.org/N9ecIeIB)
> loadstring(('').dump(function()X''end):gsub('2円%z%z%zX','0円0円0円'))()
Oh, thanks for spotting this.

AltStyle によって変換されたページ (->オリジナル) /