Re: CVS commit: src/sys/dev/pci

2016-10-25 Thread Paul Goyette
On Wed, 26 Oct 2016, Christos Zoulas wrote: In article , Paul Goyette wrote: On Wed, 26 Oct 2016, matthew green wrote: i think you're right that the 'cp' manipulation is the problem. snprintf() will return the

Re: CVS commit: src/sys/dev/pci

2016-10-25 Thread Taylor R Campbell
Date: Wed, 26 Oct 2016 06:10:39 +0800 (PHT) From: Paul Goyette There's only 9 snprintf() calls. I could simply provide a macro: #define ADD_TEXT(dest, end, format, ...) \ {\

Re: CVS commit: src/sys/dev/pci

2016-10-25 Thread Christos Zoulas
In article , Paul Goyette wrote: >On Wed, 26 Oct 2016, matthew green wrote: > >> i think you're right that the 'cp' manipulation is the problem. >> snprintf() will return the "desired" size, so upon the first >> attempted

re: CVS commit: src/sys/dev/pci

2016-10-25 Thread Paul Goyette
On Wed, 26 Oct 2016, matthew green wrote: i think you're right that the 'cp' manipulation is the problem. snprintf() will return the "desired" size, so upon the first attempted overflow the 'cp' is moved beyond 'ep', and then the next snprintf() gets a negative aka extremely massive value for

re: CVS commit: src/sys/dev/pci

2016-10-25 Thread Paul Goyette
On Wed, 26 Oct 2016, matthew green wrote: "Paul Goyette" writes: Module Name:src Committed By: pgoyette Date: Tue Oct 25 05:43:40 UTC 2016 Modified Files: src/sys/dev/pci: pci_verbose.h Log Message: Increase max string length for PCI Product names. Affects only

re: CVS commit: src/sys/dev/pci

2016-10-25 Thread matthew green
> We currently have a few product names that exceed the old limit, and > this is triggering an SSP check in pci_devinfo(). This commit doesn't > directly address the SSP issue, but pushes the can down the road... i think you're right that the 'cp' manipulation is the problem. snprintf() will

re: CVS commit: src/sys/dev/pci

2016-10-25 Thread matthew green
"Paul Goyette" writes: > Module Name: src > Committed By: pgoyette > Date: Tue Oct 25 05:43:40 UTC 2016 > > Modified Files: > src/sys/dev/pci: pci_verbose.h > > Log Message: > Increase max string length for PCI Product names. Affects only kernels > with PCIVERBOSE (or