From 5f1e90fc585edb9e9009ff308011a5a1d0a0e455 Mon Sep 17 00:00:00 2001 From: cremno Date: Tue, 25 Nov 2014 01:46:06 +0100 Subject: add missing null-termination --- mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c | 1 + 1 file changed, 1 insertion(+) (limited to 'mrbgems/mruby-bin-debugger/tools') diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c b/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c index 53f5fe4ef..20378522f 100755 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c @@ -75,6 +75,7 @@ dirname(mrb_state *mrb, const char *path) if ((dir = mrb_malloc(mrb, len + 1)) != NULL) { strncpy(dir, path, len); + dir[len] = '\0'; } return dir; } -- cgit v1.2.3