summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-bin-debugger/tools
diff options
context:
space:
mode:
authorcremno <[email protected]>2014-11-25 01:46:06 +0100
committercremno <[email protected]>2014-11-25 01:46:06 +0100
commit5f1e90fc585edb9e9009ff308011a5a1d0a0e455 (patch)
tree9138d7416cd91b2a388fc0c02e40ae183fed87c1 /mrbgems/mruby-bin-debugger/tools
parent87ce13f91d4ba874bbb5a0eac62f7aa9ae80fd3c (diff)
downloadmruby-5f1e90fc585edb9e9009ff308011a5a1d0a0e455.tar.gz
mruby-5f1e90fc585edb9e9009ff308011a5a1d0a0e455.zip
add missing null-termination
Diffstat (limited to 'mrbgems/mruby-bin-debugger/tools')
-rwxr-xr-xmrbgems/mruby-bin-debugger/tools/mrdb/apilist.c1
1 files changed, 1 insertions, 0 deletions
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;
}