Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long PCI ID causing truncation #139

Closed
sslupsky opened this issue Apr 11, 2023 · 1 comment
Closed

Long PCI ID causing truncation #139

sslupsky opened this issue Apr 11, 2023 · 1 comment

Comments

@sslupsky
Copy link

sslupsky commented Apr 11, 2023

There are a few PCI vendor and device names when combined with the device codes (-nn option) causes a string length to exceed the size of the buffer and thus the output is truncated.

For instance,
Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers

generates the following string:
0000:ff:0f.2 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers [808... (rev 04)

The problem can be fixed by increasing the size of the devbuf here:

char classbuf[128], devbuf[128];

@gollux
Copy link
Contributor

gollux commented May 1, 2023

I enlarged the buffers, but the correct solution is to trim enormous names in the ID database.

@gollux gollux closed this as completed May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants