Fix heap corruption that could occur when HSTS feature is enabled

At least on Windows, when realloc() is used to allocate a new buffer,
guess what's in that buffer initially? undefined values. So you can't
strcat() onto the end of that! Ouch. This was a fun one to track down.
3 jobs for master in 17 minutes and 57 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Build
passed #1108
build-sbbs

00:15:26

passed #1109
build-sexpots

00:00:10

passed #1110
build-syncterm

00:02:19