From: Victor Julien Date: Fri, 27 Sep 2013 15:49:56 +0000 (+0200) Subject: DNS: copy only the length of the hardcoded string, not the length of the destination... X-Git-Tag: suricata-2.0beta2~269 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c08b2296fce79cc49d73a67fc3a2c04551a8ccb;p=thirdparty%2Fsuricata.git DNS: copy only the length of the hardcoded string, not the length of the destination buffer. --- diff --git a/src/app-layer-dns-common.c b/src/app-layer-dns-common.c index 5902d663d7..48704635cd 100644 --- a/src/app-layer-dns-common.c +++ b/src/app-layer-dns-common.c @@ -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, "", fqdn_size); + memcpy(fqdn, "", 6); SCReturnUInt(6U); }