From: Russ Combs Date: Tue, 22 Jul 2014 18:12:19 +0000 (-0400) Subject: fixed the same constness issue in replace X-Git-Tag: 3.0.0-233~1440^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9914b4939ee6f1914bbfd9fafaa1c685e04edd13;p=thirdparty%2Fsnort3.git fixed the same constness issue in replace --- diff --git a/src/ips_options/ips_replace.cc b/src/ips_options/ips_replace.cc index b530c1ea8..f53dc607b 100644 --- a/src/ips_options/ips_replace.cc +++ b/src/ips_options/ips_replace.cc @@ -49,9 +49,9 @@ static void replace_parse(const char* args, string& s) char tmp_buf[MAX_PATTERN_SIZE]; /* got enough ptrs for you? */ - char *start_ptr; - char *end_ptr; - char *idx; + const char *start_ptr; + const char *end_ptr; + const char *idx; const char *dummy_idx; const char *dummy_end; char hex_buf[3]; @@ -98,9 +98,6 @@ static void replace_parse(const char* args, string& s) return; } - /* set the end to be NULL */ - *end_ptr = '\0'; - /* how big is it?? */ size = end_ptr - start_ptr;