From Brice Augustin: Use the correct packet length in randpkt.
Build randpkt.exe by default under Windows. svn path=/trunk/; revision=15092
This commit is contained in:
parent
a64a4043c3
commit
db5add1cc3
|
@ -104,7 +104,7 @@ randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
|
|||
$(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib
|
||||
|
||||
EXECUTABLES=ethereal.exe ethereal-gtk2.exe tethereal.exe \
|
||||
capinfos.exe editcap.exe mergecap.exe text2pcap.exe
|
||||
capinfos.exe editcap.exe mergecap.exe text2pcap.exe randpkt.exe
|
||||
|
||||
RESOURCES=image\ethereal.res image\libethereal.res image\tethereal.res \
|
||||
image\capinfos.res image\editcap.res image\mergecap.res \
|
||||
|
|
|
@ -515,7 +515,7 @@ main(int argc, char **argv)
|
|||
pkthdr.len = len_this_pkt;
|
||||
pkthdr.ts.tv_sec = i; /* just for variety */
|
||||
|
||||
for (j = example->sample_length; j < len_random; j++) {
|
||||
for (j = example->sample_length; j < len_this_pkt; j++) {
|
||||
/* Add format strings here and there */
|
||||
if ((int) (100.0*rand()/(RAND_MAX+1.0)) < 3 && j < (len_random - 3)) {
|
||||
memcpy(&buffer[j], "%s", 3);
|
||||
|
|
Loading…
Reference in New Issue