]> git.ipfire.org Git - thirdparty/squid.git/commit - src/AccessLogEntry.cc
Fix several buffer termination bugs
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 18 Nov 2012 10:37:19 +0000 (03:37 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 18 Nov 2012 10:37:19 +0000 (03:37 -0700)
commit0a84e4fbdaf9d33355297943776e37b242e3f15d
treed3fab1f36ab6b8f7517d69ca70291d270c3d43a0
parent8ba7dba715f0dea185a68cf6dcf9cdea7c4f6af4
Fix several buffer termination bugs

* strcpy() replaced in several places with strncpy() to ensure destination
  buffers are not overflowed.

* strncpy() does not nul-terminate the destination when the string being
  copied in exactly fills the buffer. Ensure we have terminated strings
  where it may matter.

 Detected by Coverity Scan. Issues 740309, 740310, 740311, 740481, 740483
src/AccessLogEntry.cc
src/dns_internal.cc
src/neighbors.cc
src/tools.cc
src/url.cc
src/wccp2.cc