]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
DNS: copy only the length of the hardcoded string, not the length of the destination...
authorVictor Julien <victor@inliniac.net>
Fri, 27 Sep 2013 15:49:56 +0000 (17:49 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 30 Sep 2013 15:26:38 +0000 (17:26 +0200)
src/app-layer-dns-common.c

index 5902d663d7b2bf545467da140962050b2b5b7f78..48704635cdf17063c84d98a59ea634f4b0f8a5a3 100644 (file)
@@ -416,7 +416,7 @@ static uint16_t DNSResponseGetNameByOffset(const uint8_t * const input, const ui
     SCLogDebug("qry length %u", length);
 
     if (length == 0) {
-        memcpy(fqdn, "<root>", fqdn_size);
+        memcpy(fqdn, "<root>", 6);
         SCReturnUInt(6U);
     }