From 9e3b784b342e6442f4b8298767db83f1ad384f1f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 27 Apr 2022 09:27:32 +0200 Subject: [PATCH] bluez5: use reallocarray --- spa/plugins/bluez5/bluez5-dbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/bluez5/bluez5-dbus.c b/spa/plugins/bluez5/bluez5-dbus.c index b81868294..98bf05df1 100644 --- a/spa/plugins/bluez5/bluez5-dbus.c +++ b/spa/plugins/bluez5/bluez5-dbus.c @@ -1579,7 +1579,7 @@ const struct a2dp_codec **spa_bt_device_get_supported_a2dp_codecs(struct spa_bt_ if (j >= size) { const struct a2dp_codec **p; size = size * 2; - p = realloc(supported_codecs, size * sizeof(const struct a2dp_codec *)); + p = reallocarray(supported_codecs, size, sizeof(const struct a2dp_codec *)); if (p == NULL) { free(supported_codecs); return NULL;