-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Peter,

On 10/24/13, 12:25 PM, Peter Aarestad wrote:
> Actually, here's the patch I just did, based on the comments in
> that bug report

Here is my preferred patch:

Index: common/jk_map.c
===================================================================
- --- common/jk_map.c   (revision 1535519)
+++ common/jk_map.c     (working copy)
@@ -189,13 +189,12 @@
     int int_res;
     int multit = 1;

- -    sprintf(buf, "%d", def);
- -    rc = jk_map_get_string(m, name, buf);
+    rc = jk_map_get_string(m, name, NULL);

     len = strlen(rc);
     if (len) {
         char *lastchar = &buf[0] + len - 1;
- -        strcpy(buf, rc);
+        strncpy(buf, rc, 100);
         if ('m' == *lastchar || 'M' == *lastchar) {
             *lastchar = '\0';
             multit = 1024 * 1024;

There are other things I'd like to change about that function, too,
but they are more about clean-up and not about fixing this bug.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSaX8JAAoJEBzwKT+lPKRYb7oP/R3B4oZMY0SKnau9/tmBRdcW
aln27IQuZF8x4SmrINHxUzjQpsFTGddOM2k/+ZisldSaWUo4MsV91PuqRWYcWtfC
Akq4Ut8RhRcgxYyH+xrSGc53mrC05CD5c8CTdR5XCv0fuSYjTHCOmu8Fs7TSa2V/
E1wzMxC4oQREFb01oGxgedQhJfweEoNxkLIbDgtiIh0GQgiPAHQQAOzds2l5NpO/
F3eSBOhDfxhRX9GdRCSEHZGg8HvpjhVsrtW75TbOv84RAkddBzN8Q6wkf3PAlWvv
R88nB6A/Iso6tI7EXJAHQic9ljwpO1Ejzz5QEjomVNdZ3NQFMWL7lFRrgt9+VrrF
cq3WMqdIDsRiW4XEeVQvArYdeA9iSJI3iV9nD501RniUhCNmoivoZBB3xFukjm/E
Y9peyOWoU3WLOglIq7B2wrkLm21RU175XuZ2x4WBTRbDAjTog67XCQIsZcYzmEAs
+eRnuHzjGIKJ1W7ssJJIz359lSX6T56zS1epGcLi2TVSSslaN18op8W/IX2PPZQ0
u5jIQyZLkRgHUQZ/Z+UGT2XT2tRvBYxq1Z3x1a5IQ9viGqa4/E/Rz8AeDIkpsRb4
riTdNWgQ2RlkZzxKeB+5+CZiGIhudwM9LMRwpMuPtI88V6EDZorFeYnSyK0dK/Gd
f8e9XrYm4Lh/Uu6C3J+1
=yP7D
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to