Commit 1d34b6b
committed
libsepol: do not pass NULL to memcpy
For the first iteration `mod->perm_map[sclassi]` is NULL, thus do not
use it as source of a memcpy(3).
Use a realloc + memset instead of a calloc and free to increase the size
of `mod->perm_map[sclassi]`.
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>1 parent 497261e commit 1d34b6b
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
194 | | - | |
195 | | - | |
| 193 | + | |
196 | 194 | | |
197 | 195 | | |
198 | 196 | | |
| |||
0 commit comments