selinux/libsepol
Christian Göttsche 541aab8845 libsepol: avoid memory corruption on realloc failure
Use a single pointer variable for the realloc(3) result to not
immediately override the source pointer.

Also don't unnecessarily copy the first character.

Reported by Clang Analyzer:

    services.c:810:14: warning: Assigned value is garbage or undefined [core.uninitialized.Assign]
      810 |                                         **r_buf = **new_buf;
          |                                                 ^ ~~~~~~~~~

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
2023-11-15 08:38:46 -05:00
..
cil libsepol/cil: Add cil_write_post_ast function 2023-08-16 13:34:09 -04:00
fuzz libsepol/fuzz: more strict fuzzing of binary policies 2023-07-12 13:01:15 -04:00
include libsepol: Changes to ebitmap.h to fix compiler warnings 2023-08-16 13:33:48 -04:00
man Do not automatically install Russian translations 2023-08-16 13:33:47 -04:00
src libsepol: avoid memory corruption on realloc failure 2023-11-15 08:38:46 -05:00
tests libsepol/tests: rename bool indentifiers 2023-05-03 09:15:20 -04:00
utils
.gitignore
LICENSE
Makefile
VERSION Update VERSIONs to 3.6-rc1 for release. 2023-11-08 12:51:35 +01:00