Whamcloud - gitweb
libss: fix possible NULL pointer dereferece on allocation failure
authorLukas Czerner <lczerner@redhat.com>
Thu, 17 Feb 2022 09:24:59 +0000 (10:24 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 28 Apr 2022 17:12:47 +0000 (13:12 -0400)
commita282671a02e8fffa04ac0f9db7982fd6bb0a0916
treee76118cc595ad715d408e87c838f692ccc741ec5
parent997902106fab2bc7cb0f7251eb55fad4b721b51a
libss: fix possible NULL pointer dereferece on allocation failure

Currently in ss_execute_command() we're missng a check to see if the
memory allocation was succesful. Fix it by checking the return from
malloc and returning ENOMEM if it had failed.

[ Removed addition of the SS_ET_ENOMEM entry to the the libss error
  table.  -TYT ]

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ss/execute_cmd.c