1 |
slords |
1.1 |
--- extensions/ulogd_BASE.c.fortify-source 2007-08-06 11:23:53.000000000 +0200 |
2 |
|
|
+++ extensions/ulogd_BASE.c 2007-08-06 11:28:47.000000000 +0200 |
3 |
|
|
@@ -63,7 +63,7 @@ static ulog_iret_t *_interp_raw(ulog_int |
4 |
|
|
{ |
5 |
|
|
unsigned char *p; |
6 |
|
|
int i; |
7 |
|
|
- char *buf, *oldbuf = NULL; |
8 |
|
|
+ char *buf = NULL; |
9 |
|
|
ulog_iret_t *ret = ip->result; |
10 |
|
|
|
11 |
|
|
if (pkt->mac_len) { |
12 |
|
|
@@ -75,9 +75,8 @@ static ulog_iret_t *_interp_raw(ulog_int |
13 |
|
|
*buf = '\0'; |
14 |
|
|
|
15 |
|
|
p = pkt->mac; |
16 |
|
|
- oldbuf = buf; |
17 |
|
|
for (i = 0; i < pkt->mac_len; i++, p++) |
18 |
|
|
- sprintf(buf, "%s%02x%c", oldbuf, *p, i==pkt->mac_len-1 ? ' ':':'); |
19 |
|
|
+ sprintf(buf + (i*3), "%02x%c", *p, i==pkt->mac_len-1 ? ' ':':'); |
20 |
|
|
ret[0].value.ptr = buf; |
21 |
|
|
ret[0].flags |= ULOGD_RETF_VALID; |
22 |
|
|
} |