Shaohua Li <shaohua.li@xxxxxxxxx> writes: > +static void ata_acpi_uevent(struct ata_port *ap, struct ata_device *dev, > + u32 event) > +{ > + struct kobject *kobj = NULL; > + char event_string[12]; > + char *envp[] = { event_string, NULL }; > + > + if (dev) { > + if (dev->sdev) > + kobj = &dev->sdev->sdev_gendev.kobj; > + } else > + kobj = &ap->dev->kobj; > + > + if (kobj) { > + sprintf(event_string, "BAY_EVENT=%d", event); That will overflow when event is more than one digit. Is that enforced? Should be buffer be larger? snprintf is safer -Andi -- ak@xxxxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html