[PATCH] staging: unisys: added virtpci info entry

Dan Carpenter dan.carpenter at oracle.com
Sat Jul 12 08:10:51 UTC 2014


On Fri, Jul 11, 2014 at 07:11:45PM -0400, Erik Arfvidson wrote:
> +static int print_vbus(struct device *vbus, void *data)
> +{
> +	struct print_vbus_info *p = (struct print_vbus_info *)data;
> +
> +	*p->length += sprintf(p->buf + *p->length, "bus_id:%s\n",
> +			      dev_name(vbus));

This sprintf() can corrupt memory if you pass too short a "len".

> +	return 0;
> +}

regards,
dan carpenter



More information about the devel mailing list