Browse Source

fix string length in snprintf for ARP table to include null byte

master
Brad Parker 11 years ago
parent
commit
40ee2838fe
  1. 2
      tui/main.cpp

2
tui/main.cpp

@ -139,7 +139,7 @@ void arpMenu(WINDOW *window) {
const char *arpStr = arpArray.constData();
const char *arpMacStr = arpMacArray.constData();
snprintf(str, width + 4, formatStr, arpStr, arpMacStr);
snprintf(str, width + 5, formatStr, arpStr, arpMacStr);
/*memcpy(str, arpStr, strlen(arpStr));
memcpy(str + strlen(arpStr), " at ", 4);
memcpy(str + strlen(arpStr) + 4, arpMacStr, strlen(arpMacStr));*/

Loading…
Cancel
Save