[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bytecode abuse in Lua 5.2 (-work4)
- From: HyperHacker <hyperhacker@...>
- Date: Sun, 22 Aug 2010 11:53:10 -0600
On Sun, Aug 22, 2010 at 10:16, Matthew Wild <mwild1@gmail.com> wrote:
> On 22 August 2010 14:25, HyperHacker <hyperhacker@gmail.com> wrote:
>>
>
>> Why compile-time? Hide the real load() in a table that the script
>> never has access to, and provide your own load() that rejects any
>> string beginning with string.char(0x27). There you go.
>>
>> (Obviously don't ACTUALLY use string.char(0x27) in the function, but
>> rather its precomputed result, lest the script simply redefine char.)
>>
>
> Exactly one reason to have it compile-time, so that people don't make
> the same fatal mistake you just did ;)
>
> Escape (and the first char of binary chunks) is "\027", not 0x27.
>
> Matthew
>
Well, if I were actually writing such a function, I'd have tested it. :-p
--
Sent from my toaster.
- References:
- Bytecode abuse in Lua 5.2 (-work4), Peter Cawley
- Re: Bytecode abuse in Lua 5.2 (-work4), Majic
- Re: Bytecode abuse in Lua 5.2 (-work4), Martin Guy
- Re: Bytecode abuse in Lua 5.2 (-work4), Joshua Jensen
- Re: Bytecode abuse in Lua 5.2 (-work4), Jonathan Castello
- Re: Bytecode abuse in Lua 5.2 (-work4), Joshua Jensen
- Re: Bytecode abuse in Lua 5.2 (-work4), Martin Guy
- Re: Bytecode abuse in Lua 5.2 (-work4), KHMan
- Re: Bytecode abuse in Lua 5.2 (-work4), HyperHacker
- Re: Bytecode abuse in Lua 5.2 (-work4), KHMan
- Re: Bytecode abuse in Lua 5.2 (-work4), Stuart P. Bentley
- Re: Bytecode abuse in Lua 5.2 (-work4), HyperHacker
- Re: Bytecode abuse in Lua 5.2 (-work4), Matthew Wild