From: Jeff Lucovsky Date: Sat, 12 Oct 2019 14:35:53 +0000 (-0400) Subject: mem: Use correct len with strlcpy X-Git-Tag: suricata-5.0.0~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=42452b327c7a5e3813a89d8e219b710c02cf7b2b;p=thirdparty%2Fsuricata.git mem: Use correct len with strlcpy --- diff --git a/src/util-mem.h b/src/util-mem.h index 1a80480ba2..52ed35d518 100644 --- a/src/util-mem.h +++ b/src/util-mem.h @@ -172,7 +172,7 @@ SC_ATOMIC_EXTERN(unsigned int, engine_stage); exit(EXIT_FAILURE); \ } \ } else { \ - strlcpy(ptrmem, (a), _len); \ + strlcpy(ptrmem, (a), _scstrndup_len); \ *(ptrmem + _len) = '\0'; \ } \ \ @@ -296,7 +296,7 @@ SC_ATOMIC_EXTERN(unsigned int, engine_stage); exit(EXIT_FAILURE); \ } \ } else { \ - strlcpy(ptrmem, (a), _len); \ + strlcpy(ptrmem, (a), _scstrndup_len); \ *(ptrmem + _len) = '\0'; \ } \ (void*)ptrmem; \