iptraf-ng-1.1.4-sprintf-format.patch 551 B

123456789101112131415161718192021
  1. --- a/src/othptab.c
  2. +++ b/src/othptab.c
  3. @@ -410,7 +410,7 @@
  4. break;
  5. }
  6. - sprintf(scratchpad, rarp_mac_addr);
  7. + sprintf(scratchpad, "%s", rarp_mac_addr);
  8. strcat(msgstring, scratchpad);
  9. wattrset(table->othpwin, ARPATTR);
  10. break;
  11. @@ -485,7 +485,7 @@
  12. wattrset(table->othpwin, UNKNIPATTR);
  13. protptr = getprotobynumber(entry->protocol);
  14. if (protptr != NULL) {
  15. - sprintf(protname, protptr->p_aliases[0]);
  16. + sprintf(protname, "%s", protptr->p_aliases[0]);
  17. } else {
  18. sprintf(protname, "IP protocol");
  19. unknown = 1;