History log of /pciutils/bitops.h (Results 1 – 2 of 2)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v3.14.0
# a213399f 18-Jun-2025 Mingjie Shen <[email protected]>

Use snprintf instead of sprintf to prevent buffer overruns

In bitops.h, update the TABLE macro to call snprintf(buf, sizeof(buf),
...) rather than unbounded sprintf, ensuring that out-of-range indic

Use snprintf instead of sprintf to prevent buffer overruns

In bitops.h, update the TABLE macro to call snprintf(buf, sizeof(buf),
...) rather than unbounded sprintf, ensuring that out-of-range indices
produce a bounded "??%d" string.

In setpci.c, change the device slot formatting from sprintf(slot, ...) to
snprintf(slot, sizeof(slot), ...), capping output to the 16-byte buffer
and avoiding overflow when printing PCI domain, bus, dev, and func
values.

Signed-off-by: Mingjie Shen <[email protected]>

show more ...


Revision tags: v3.13.0, v3.12.0, v3.11.1, v3.11.0
# 1ffd04a8 18-Feb-2024 Martin Mares <[email protected]>

bitops.h moved to root

It is a part of the utilities, not of libpci.