sudo_debug_printf(SUDO_DEBUG_INFO, "malloc: cnt=%d", src->num_values);
dst->name = strdup(src->name);
- dst->values = reallocarray(NULL, dst->num_values, sizeof(char *));
+ dst->values = reallocarray(NULL, src->num_values, sizeof(char *));
if (dst->name == NULL || dst->values == NULL)
goto oom;
dst->num_values = src->num_values;
for (i = 0; i < src->num_attrs; ++i) {
if (!sudo_sss_attrcpy(dst->attrs + i, src->attrs + i)) {
- sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory"));
dst->num_attrs = i;
sudo_sss_rulefree(dst);
debug_return_bool(false);