-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
All,
On 10/24/13, 4:33 PM, Christopher Schultz wrote:
> All,
>
> On 10/24/13, 4:11 PM, Christopher Schultz wrote:
>> 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:
>
> Er, that's not going to work ;)
>
> I'm actively working on this, now, so it shouldn't be long. ;)
Once I realized I was editing the wrong copy of the file, development
on this went much more quickly ;)
Index: native/common/jk_map.c
===================================================================
- --- native/common/jk_map.c (revision 1535519)
+++ native/common/jk_map.c (working copy)
@@ -189,13 +189,15 @@
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);
+ if(NULL == rc) {
+ int_res = def;
+ } else {
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;
@@ -208,6 +210,7 @@
}
else
int_res = def;
+ }
return int_res * multit;
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBCAAGBQJSaYfyAAoJEBzwKT+lPKRYoGUP/1pMlAMnnzzawQ1oLoGUmuFL
jFcVtrVr2R1cFNXof9bj/lVY69qOj7eJd4QRM61C8kQH85pQbX18O1vYg6ALxaT3
Mlm1EIKOSluECbb3yCax+w+/BKXI1jlI9o57D1MYvjFlpXVKwex9Hsd6ERYelqFy
ol1GUhb42zakw/CSFz2yAddqxFVWCQPFCAc2u4tCfEsmmUwOOOtyz/tZrkQNVRPd
aNBSdpfXXlQxMqRi3GkbQq6HRBAduuu7WUrYdmSC3CCb1NC/YoTMCVhND1KAX/PD
0WWZL5SEaBNLOP4a4zp5DZ5XRh4pqEHOofBknaO3Y9ucp5kqAcJfdRQ+slunCvjf
pOfXVAyAr24pFROIItQcAdtO45VG7lkLbxG66SuAnBdorp/kBjdFJwDVXR8yjjay
ig4z1vWOdLCQ9mXzaHseWPjue3fZ92Q9dCDs5vdHAOiYcF/y9o1fjcGX7YIvY43C
vM3mHi2+1W/mwrf+Dey92jHsrMpNqsgTnJmxw0k78Y6rZLBdzwFhsy22MYiGCcEy
sJCWnHHtHuiboQoEBs78wgq/7TivX7xgyMATEYBYiUYHU24l/uY4yitbZndh9ukx
iddr/0MTtXnj44JSnZSHqfct1/PGQVaQR0XucH4PRnFye8SUhgcjTOiP/Z0ZGGso
eJKkBEcXlq7Pv36TW1qK
=fSvA
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]