[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why does LoadString return NULL for zero-length strings?
- From: "Peter Cawley" <lua@...>
- Date: Mon, 1 Sep 2008 16:00:32 +0100
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.