[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bindat can exhaust memory when unpacking to vector
|
From: |
Stefan Monnier |
|
Subject: |
Re: Bindat can exhaust memory when unpacking to vector |
|
Date: |
Sat, 04 Nov 2023 04:21:25 -0400 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>> But, again, users of Bindat can be expected to know that tainted data
>> should be sanitized. And what is described above is an implementation
>> detail. So it does not make much sense to mention this in the manual.
>
> Stefan, any comments?
Hmm... I'm also tempted to say it's the programmer's fault, yet at the
same time, it's BinDat which does the parsing so the programmer doesn't
really have much opportunity to sanitize the data beforehand (short of
doing a manual pre-parse which kind of defeats the purpose).
With `bindat-type`, it's not too hard to insert ELisp code within the
BinDat parsing, so it *can* be solved from there, but it's indeed not
something that's been seriously considered so far.
Kind of an embarrassing blind spot. BinDat should instead encourage the
addition of sanity checks within the parsing code (including maybe add
specific support for it).
Stefan