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]


2008年9月1日 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>> 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.
>
Ah yes; it's only strings from the constant table which should have
zeros on the end (I think?). Thus the check for NULL should be in the
constant loading code rather than the string loading code as I
suggested.

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