[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why does LoadString return NULL for zero-length strings?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 1 Sep 2008 11:48:34 -0300
> 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.