mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-04-18 04:00:41 +02:00
util: do an allocation null check in strstrip
This commit is contained in:
parent
55fe9303fb
commit
96609f82a0
1 changed files with 2 additions and 0 deletions
|
|
@ -366,6 +366,8 @@ strstrip(const char *input, const char *what)
|
|||
char *str, *last;
|
||||
|
||||
str = xstrdup(&input[strspn(input, what)]);
|
||||
if (!str)
|
||||
return NULL;
|
||||
|
||||
last = str;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue