← Commit list

bbf4e167f

Rob Landley
Rob Landley
2006-01-11
SOURCE BUG Duration: 9s

Subject

Ok, ping needs a rewrite from the ground up. (This is not a busybox app.) Fix bug 309, where ping -s 1 localhost would give an elapsed time 9 digits long due to a stack overflow. Apparently, iputils also does this.

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/ping.c+2 -2
@@ -200,7 +200,7 @@ static void sendping(int junk)
{
struct icmp *pkt;
int i;
- char packet[datalen + 8];
+ char packet[datalen + sizeof(struct icmp)];
pkt = (struct icmp *) packet;
@@ -211,7 +211,7 @@ static void sendping(int junk)
pkt->icmp_id = myid;
CLR(ntohs(pkt->icmp_seq) % MAX_DUP_CHK);
- gettimeofday((struct timeval *) &packet[8], NULL);
+ gettimeofday((struct timeval *) &pkt->icmp_dun, NULL);
pkt->icmp_cksum = in_cksum((unsigned short *) pkt, sizeof(packet));
i = sendto(pingsock, packet, sizeof(packet), 0,