git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-41
2004-05-28 Martin Mares <mj@ucw.cz>
+ * lspci.c (format_agp_rate): Write "x16", not "x@".
+ (show_agp): rate[] could overflow.
+ Bugs reported by Jakub Bogusz <qboosh@pld-linux.org>.
+
* lspci.c (show_ht_*): Show HyperTransport capability with all its
details. Once again code by Maciej simplified (i.e., possibly broken)
by me.
{
if (c != buf)
*c++ = ',';
- *c++ = 'x';
- *c++ = '0' + (1 << (i + 2*agp3));
+ c += sprintf(c, "x%d", 1 << (i + 2*agp3));
}
if (c != buf)
*c = 0;
show_agp(struct device *d, int where, int cap)
{
u32 t;
- char rate[8];
+ char rate[16];
int ver, rev;
int agp3 = 0;