summaryrefslogtreecommitdiff
path: root/package/snort/patches/patch-src_output-plugins_spo_alert_unixsock_c
blob: 5b07072bee7b7746d625c54dc3dbc0c7086cd899 (plain)
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
--- snort-2.8.5.2.orig/src/output-plugins/spo_alert_unixsock.c	2009-05-07 00:29:12.000000000 +0200
+++ snort-2.8.5.2/src/output-plugins/spo_alert_unixsock.c	2010-01-19 20:05:44.000000000 +0100
@@ -179,13 +179,13 @@ void AlertUnixSock(Packet *p, char *msg,
     bzero((char *)&alertpkt,sizeof(alertpkt));
     if (event)
     {
-        bcopy((const void *)event,(void *)&alertpkt.event,sizeof(Event));
+        memcpy((void *)&alertpkt.event,(const void *)event,sizeof(Event));
     }
 
     if(p && p->pkt)
     {
-        bcopy((const void *)p->pkth,(void *)&alertpkt.pkth,sizeof(struct pcap_pkthdr));
-        bcopy((const void *)p->pkt,alertpkt.pkt,
+        memcpy((void *)&alertpkt.pkth,(const void *)p->pkth,sizeof(struct pcap_pkthdr));
+        memcpy(alertpkt.pkt,(const void *)p->pkt,
               alertpkt.pkth.caplen > SNAPLEN? SNAPLEN : alertpkt.pkth.caplen);
     }
     else
@@ -193,7 +193,7 @@ void AlertUnixSock(Packet *p, char *msg,
 
     if (msg)
     {
-        bcopy((const void *)msg,(void *)alertpkt.alertmsg,
+        memcpy((void *)alertpkt.alertmsg,(const void *)msg,
                strlen(msg)>ALERTMSG_LENGTH-1 ? ALERTMSG_LENGTH - 1 : strlen(msg));
     }