diff options
Diffstat (limited to 'Xext/xselinux_label.c')
-rw-r--r-- | Xext/xselinux_label.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Xext/xselinux_label.c b/Xext/xselinux_label.c index 2c33d1cbf..8559385b9 100644 --- a/Xext/xselinux_label.c +++ b/Xext/xselinux_label.c @@ -64,7 +64,7 @@ SELinuxArraySet(SELinuxArrayRec * rec, unsigned key, void *val) { if (key >= rec->size) { /* Need to increase size of array */ - rec->array = realloc(rec->array, (key + 1) * sizeof(val)); + rec->array = reallocarray(rec->array, key + 1, sizeof(val)); if (!rec->array) return FALSE; memset(rec->array + rec->size, 0, (key - rec->size + 1) * sizeof(val)); |