You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2021/02/23 17:50:08 UTC

[trafficserver] branch 9.0.x updated: Fix out of bounds access error in jtest (#7526)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 045ed15  Fix out of bounds access error in jtest (#7526)
045ed15 is described below

commit 045ed1513fa412ca3941c83cdddf7bee5da24890
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Wed Feb 17 05:52:48 2021 +0900

    Fix out of bounds access error in jtest (#7526)
    
    (cherry picked from commit 7a7a89960ce71be9fce3b0bcf5eb4f7c169903ca)
---
 tools/jtest/jtest.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/jtest/jtest.cc b/tools/jtest/jtest.cc
index 3f04a50..d251520 100644
--- a/tools/jtest/jtest.cc
+++ b/tools/jtest/jtest.cc
@@ -4800,7 +4800,7 @@ ink_web_escapify_string(char *dest_in, char *src_in, int max_dest_len)
   int quit   = 0;
 
   while ((*src != 0) && (dcount < max_dest_len) && (quit == 0)) {
-    if ((char *)memchr(dontescapify, *src, INT_MAX) || ParseRules::is_alpha(*src) || ParseRules::is_digit(*src)) {
+    if ((char *)strchr(dontescapify, *src) || ParseRules::is_alpha(*src) || ParseRules::is_digit(*src)) {
       /* this is regular character, don't escapify it */
       if (dcount + 1 < max_dest_len) {
         *dest++ = *src;