[PATCH libinput] util: abort if we try to allocate more than a MB

Jan Engelhardt jengelh at inai.de
Wed Jun 20 07:12:54 UTC 2018


On Wednesday 2018-06-20 02:22, Matheus Santana wrote:

>Reviewed-by: Matheus Santana <embs at cin.ufpe.br>
>
>The check for negatives isn't needed anymore?

It indeed is not, since a (size_t)-1 is generally greater than 1048576.

>      Let's put a cap on for one MB, anything above that is likely some memory
>      corruption and should be caught early.


More information about the wayland-devel mailing list