]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
fixed the same constness issue in replace
authorRuss Combs <rucombs@cisco.com>
Tue, 22 Jul 2014 18:12:19 +0000 (14:12 -0400)
committerRuss Combs <rucombs@cisco.com>
Tue, 22 Jul 2014 18:12:19 +0000 (14:12 -0400)
src/ips_options/ips_replace.cc

index b530c1ea847b95c7fc2bc2d644a9e7ea1e715b34..f53dc607bb38bf7a9e309dc4079b32a8cdabaa62 100644 (file)
@@ -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;