From 00a623e565cb60feee124394f18b32cfee3c6386 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Mon, 19 Feb 2018 02:19:22 +0200 Subject: jvm: always null terminate strings --- src/fakejvm/jvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/fakejvm/jvm.c b/src/fakejvm/jvm.c index f71412f..baf097c 100644 --- a/src/fakejvm/jvm.c +++ b/src/fakejvm/jvm.c @@ -35,7 +35,7 @@ jvm_string_set_cstr_with_length(struct jvm_string *string, const char *data, con assert(string); char *copy = (char*)data; - if (heap && data && len > 0 && !(copy = ccopy(data, len, data[len] != 0))) + if (heap && data && len > 0 && !(copy = ccopy(data, len, true))) return false; jvm_string_release(string); -- cgit v1.2.3-70-g09d2