ETHER: Avoid potential compiler warning about version string overrun
gcc 9.3.0 on Ubuntu 20.04 somehow knows that the length of the string pcap_lib_version() returns can be 256 bytes long. It then generates a warning about truncation potential. The problematic code path will only be executed on Windows with an old version of Npcap, but the compiler can't know that. Make the local buffer larger to silence the resulting noise.
This commit is contained in:
parent
918f7704da
commit
8c57893675
1 changed files with 1 additions and 1 deletions
|
@ -2475,7 +2475,7 @@ return SCPE_OK;
|
|||
const char *eth_version (void)
|
||||
{
|
||||
#if defined(HAVE_PCAP_NETWORK)
|
||||
static char version[256];
|
||||
static char version[300];
|
||||
|
||||
if (!version[0]) {
|
||||
strlcpy(version, pcap_lib_version(), sizeof(version));
|
||||
|
|
Loading…
Add table
Reference in a new issue