On Mon, 22 Dec 2008 17:54:08 +0100, Peter Stuge <[email protected]> wrote:
> ron minnich wrote:
>> char *partport = "parport0";
>> static char parportname[MAXPATHLEN];
>>
>> sprintf(parportname, "/proc/sys/dev/parport/%s/base-addr", parport );
> 
> Please make sure to always use
> 
> snprintf(parportname, sizeof(parportname), "/proc/...", parport);
> 
> to avoid buffer overflows, and check the return value. Not that I
> always do, but I should.
> 
Thanks for the tip Peter, I'll check this out.
-- 
Thanks,
Joseph Smith
Set-Top-Linux
www.settoplinux.org


--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to