lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 28 Nov 2014 16:03:20 +0000
From:	Mark Brown <broonie@...nel.org>
To:	Peter Rosin <peda@...ator.liu.se>
Cc:	alsa-devel@...a-project.org, Liam Girdwood <lgirdwood@...il.com>,
	linux-kernel@...r.kernel.org, Peter Rosin <peda@...ntia.se>
Subject: Re: [PATCH] ASoC: Augment existing card DAPM routes in
 snd_soc_of_parse_audio_routing

On Thu, Nov 27, 2014 at 10:02:42PM +0100, Peter Rosin wrote:

> -	routes = devm_kzalloc(card->dev, num_routes * sizeof(*routes),
> +	old_routes = card->num_dapm_routes;
> +	routes = devm_kzalloc(card->dev,
> +			      (old_routes + num_routes) * sizeof(*routes),
>  			      GFP_KERNEL);
>  	if (!routes) {
>  		dev_err(card->dev,
> @@ -4611,9 +4613,11 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
>  		return -EINVAL;
>  	}
>  
> +	memcpy(routes, card->dapm_routes, old_routes * sizeof(*routes));
> +

Aren't we open coding krealloc() here?

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ