aboutsummaryrefslogtreecommitdiff
path: root/jim-format.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2013-11-06 08:49:11 +1000
committerSteve Bennett <steveb@workware.net.au>2013-11-06 08:55:15 +1000
commita077f0800f5bbc7ca5f3b368726f7d1757c16549 (patch)
treed1f32c6dfaf29df2cd2a2663ba99537af59b8c26 /jim-format.c
parent91960fb0e584579c5dc25376b5bfba8c6eafa4a3 (diff)
downloadjimtcl-a077f0800f5bbc7ca5f3b368726f7d1757c16549.zip
jimtcl-a077f0800f5bbc7ca5f3b368726f7d1757c16549.tar.gz
jimtcl-a077f0800f5bbc7ca5f3b368726f7d1757c16549.tar.bz2
Fix [string tolower] buffer overflow for non-utf8
Reported-by: Andy <jimdevel@hummypkg.org.uk> Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-format.c')
-rw-r--r--jim-format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/jim-format.c b/jim-format.c
index ed612cc..818eea4 100644
--- a/jim-format.c
+++ b/jim-format.c
@@ -302,7 +302,7 @@ Jim_Obj *Jim_FormatString(Jim_Interp *interp, Jim_Obj *fmtObjPtr, int objc, Jim_
goto error;
}
/* Just store the value in the 'spec' buffer */
- formatted_bytes = utf8_fromunicode(spec, code);
+ formatted_bytes = utf8_getchars(spec, code);
formatted_buf = spec;
formatted_chars = 1;
break;