1 --- net-tools-1.60/netstat.c.trunc 2004-08-31 12:42:08.595426960 +0200
2 +++ net-tools-1.60/netstat.c 2004-08-31 12:59:55.766192344 +0200
4 get_sname(htons(local_port), "tcp",
5 flag_not & FLAG_NUM_PORT));
7 - if ((strlen(local_addr) + strlen(buffer)) > 22)
8 - local_addr[22 - strlen(buffer)] = '\0';
9 + if ((strlen(local_addr) + strlen(buffer)) >= 27)
10 + local_addr[27 - strlen(buffer) - 1] = '\0';
12 strcat(local_addr, ":");
13 strncat(local_addr, buffer, sizeof(local_addr)-strlen(local_addr)-1);
15 snprintf(buffer, sizeof(buffer), "%s",
16 get_sname(htons(rem_port), "tcp", flag_not & FLAG_NUM_PORT));
18 - if ((strlen(rem_addr) + strlen(buffer)) > 22)
19 - rem_addr[22 - strlen(buffer)] = '\0';
20 + if ((strlen(rem_addr) + strlen(buffer)) >= 27)
21 + rem_addr[27 - strlen(buffer) - 1] = '\0';
23 strcat(rem_addr, ":");
24 strncat(rem_addr, buffer, sizeof(rem_addr)-strlen(rem_addr)-1);
26 timer_run, (double) time_len / HZ, retr, timeout);
29 - printf("tcp %6ld %6ld %-23s %-23s %-12s",
30 + printf("tcp %6ld %6ld %-27s %-27s %-12s",
31 rxq, txq, local_addr, rem_addr, _(tcp_state[state]));
33 finish_this_one(uid,inode,timers);
36 printf(_("(w/o servers)"));
38 - printf(_("\nProto Recv-Q Send-Q Local Address Foreign Address State ")); /* xxx */
39 + printf(_("\nProto Recv-Q Send-Q Local Address Foreign Address State ")); /* xxx */
41 printf(_(" User Inode "));
42 print_progname_banner();