Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 25 Sep 2002 20:06:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 25 Sep 2002 20:06:42 -0400 Received: from mta6.snfc21.pbi.net ([206.13.28.240]:55005 "EHLO mta6.snfc21.pbi.net") by vger.kernel.org with ESMTP id ; Wed, 25 Sep 2002 20:06:40 -0400 Date: Wed, 25 Sep 2002 17:11:57 -0700 From: David Brownell Subject: Re: [linux-usb-devel] [RFC] consolidate /sbin/hotplug call for pci and usb To: Greg KH Cc: linux-usb-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Patrick Mochel Message-id: <3D9250CD.7090409@pacbell.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en, fr User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 References: <20020925212955.GA32487@kroah.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 595 Lines: 19 > + /* stuff we want to pass to /sbin/hotplug */ > + envp[i++] = scratch; > + scratch += sprintf (scratch, "PCI_CLASS=%04X", pdev->class) + 1; > + > + envp[i++] = scratch; > + scratch += sprintf (scratch, "PCI_ID=%04X:%04X", > + pdev->vendor, pdev->device) + 1; And so forth. Use "snprintf" and prevent overrunning those buffers... - Dave - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/