Re: [PATCH] staging: unisys: added virtpci info entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux