Re: 2.6.17-mm6

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

 



On Mon, 03 Jul 2006 10:25:45 -0700
Jeremy Fitzhardinge <[email protected]> wrote:

> Sergey Vlasov wrote:
> > These names are truncated - they should end with two hex digits:
> >
> > 	snprintf(device->bus_id, sizeof(device->bus_id), "%s:pcie%02x",
> > 		 pci_name(parent), get_descriptor_id(port_type, service_type));
> >
> > Names were truncated at 18 characters, but sizeof(device->bus_id) is 20
> > currently, so these names should just fit there.  I see that snprintf()
> > was changed recently - maybe there is some off-by-one bug there?
> >   

Darnit, I was staring at the wrong code so much that I never even noticed that.

> There was for a while, but it should be OK in -mm6.  Perhaps there's a 
> stray patch hanging around in this kernel?
> 

No, it's still wrong.

	end = buf + size - 1;
	...
	end[-1] = '\0';


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux