summaryrefslogtreecommitdiff
path: root/package/snort/patches/patch-src_dynamic-preprocessors_dns_spp_dns_c
blob: c8584410ba735e25bf74a7ae251eedf34af7df2d (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--- snort-2.8.5.1.orig/src/dynamic-preprocessors/dns/spp_dns.c	2009-10-02 22:29:57.000000000 +0200
+++ snort-2.8.5.1/src/dynamic-preprocessors/dns/spp_dns.c	2009-12-27 17:17:22.000000000 +0100
@@ -749,7 +749,7 @@ static uint16_t ParseDNSQuestion(const u
         if (dnsSessionData->curr_txt.name_state == DNS_RESP_STATE_NAME_COMPLETE)
         {
             dnsSessionData->curr_rec_state = DNS_RESP_STATE_Q_TYPE;
-            bzero(&dnsSessionData->curr_txt, sizeof(DNSNameState));
+            memset(&dnsSessionData->curr_txt, 0, sizeof(DNSNameState));
             data = data + bytes_used;
             bytes_unused = new_bytes_unused;
 
@@ -837,7 +837,7 @@ uint16_t ParseDNSAnswer(const unsigned c
         if (dnsSessionData->curr_txt.name_state == DNS_RESP_STATE_NAME_COMPLETE)
         {
             dnsSessionData->curr_rec_state = DNS_RESP_STATE_RR_TYPE;
-            bzero(&dnsSessionData->curr_txt, sizeof(DNSNameState));
+            memset(&dnsSessionData->curr_txt, 0, sizeof(DNSNameState));
             data = data + bytes_used;
         }
         bytes_unused = new_bytes_unused;
@@ -1272,7 +1272,7 @@ void ParseDNSResponseMessage(SFSnortPack
                         if (dnsSessionData->curr_rr.type == DNS_RR_TYPE_TXT)
                         {
                             /* Reset the state tracking for this record */
-                            bzero(&dnsSessionData->curr_txt, sizeof(DNSNameState));
+                            memset(&dnsSessionData->curr_txt, 0, sizeof(DNSNameState));
                         }
                         data = p->payload + (p->payload_size - bytes_unused);
                     }
@@ -1328,7 +1328,7 @@ void ParseDNSResponseMessage(SFSnortPack
                         if (dnsSessionData->curr_rr.type == DNS_RR_TYPE_TXT)
                         {
                             /* Reset the state tracking for this record */
-                            bzero(&dnsSessionData->curr_txt, sizeof(DNSNameState));
+                            memset(&dnsSessionData->curr_txt, 0, sizeof(DNSNameState));
                         }
                         data = p->payload + (p->payload_size - bytes_unused);
                     }
@@ -1384,7 +1384,7 @@ void ParseDNSResponseMessage(SFSnortPack
                         if (dnsSessionData->curr_rr.type == DNS_RR_TYPE_TXT)
                         {
                             /* Reset the state tracking for this record */
-                            bzero(&dnsSessionData->curr_txt, sizeof(DNSNameState));
+                            memset(&dnsSessionData->curr_txt, 0, sizeof(DNSNameState));
                         }
                         data = p->payload + (p->payload_size - bytes_unused);
                     }