mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-22 05:40:39 +01:00
util: use assert() instead of abort() for testing for size limits
This way we can send a message to the user, a simple abort() isn't informative enough. Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/54 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
304441df3e
commit
5354226e59
1 changed files with 1 additions and 1 deletions
|
|
@ -145,7 +145,7 @@ zalloc(size_t size)
|
|||
/* We never need to alloc anything more than 1,5 MB so we can assume
|
||||
* if we ever get above that something's going wrong */
|
||||
if (size > 1536 * 1024)
|
||||
abort();
|
||||
assert(!"bug: internal malloc size limit exceeded");
|
||||
|
||||
p = calloc(1, size);
|
||||
if (!p)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue