selinux/semodule-utils
Christian Göttsche 8547846ecd semodule_link: avoid NULL dereference on OOM
In case the initial calloc(3) call fails the variable mods is still NULL
while its size hint num_mods is set.

Reported by Clang Analyzer:

    semodule_link.c:182:29: warning: Array access (from variable 'mods') results in a null pointer dereference [core.NullDereference]
      182 |                 sepol_module_package_free(mods[i]);
          |                                           ^~~~~~~

Fixes: 63e798a203 ("semodule_link: update")

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
2023-11-15 08:38:39 -05:00
..
semodule_expand Do not automatically install Russian translations 2023-08-16 13:33:47 -04:00
semodule_link semodule_link: avoid NULL dereference on OOM 2023-11-15 08:38:39 -05:00
semodule_package Do not automatically install Russian translations 2023-08-16 13:33:47 -04:00
.gitignore semodule-utils: remove semodule_deps 2017-10-12 11:18:05 -07:00
LICENSE docs: provide a top level LICENSE file 2022-10-05 08:20:38 -04:00
Makefile semodule-utils: remove semodule_deps 2017-10-12 11:18:05 -07:00
VERSION Update VERSIONs to 3.6-rc1 for release. 2023-11-08 12:51:35 +01:00