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
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to