1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
--- a/src/utils.c
+++ b/src/utils.c
@@ -137,7 +137,7 @@
#endif
va_start(va, msgp);
- vsnprintf(msg, 256, msgp, va);
+ vsnprintf(msg, 255, msgp, va);
msg_len = strlen(msg);
--- a/src/exit.c
+++ b/src/exit.c
@@ -36,7 +36,7 @@
while(1)
{
fprintf(stderr, "\n\nWould you like to quit? (y/n): ");
- fgets(a, 16, stdin);
+ fgets(a, 2, stdin);
if(!strncasecmp(a, "Y", 1))
break;
--- a/src/define_defaults.c
+++ b/src/define_defaults.c
@@ -36,7 +36,7 @@
rand_d_port = (p_mode == M_TRACE) ? 1 : 0;
r_timeout = 1;
burst_rate = 1;
- hwaddr_p[17] = 0;
+ /* hwaddr_p[18] = 0; */
init_type = 1;
interval_sec = 1;
interval_usec = 0;
--- a/src/inject_defs.h
+++ b/src/inject_defs.h
@@ -132,9 +132,9 @@
u_int16_t rand_d_addr;
u_int8_t *s_addr; /* source ethernet address string */
- u_int8_t shw_addr[17];
+ u_int8_t shw_addr[18];
u_int8_t *d_addr; /* destination ethernet address string */
- u_int8_t dhw_addr[17];
+ u_int8_t dhw_addr[18];
} ehdr_o;
struct arphdr_opts
@@ -153,8 +153,8 @@
u_int8_t *r_eaddr; /* receiver ethernet address */
u_int16_t rand_r_eaddr;
- u_int8_t shw_addr[17];
- u_int8_t rhw_addr[17];
+ u_int8_t shw_addr[18];
+ u_int8_t rhw_addr[18];
} ahdr_o;
libnet_t *pkt_d;
|