From: Matt Birkholz Date: Tue, 8 Mar 2016 18:34:15 +0000 (-0700) Subject: microcode/option.c (string_copy_limited): Null-terminate result. X-Git-Tag: mit-scheme-pucked-9.2.12~261^2~75^2~14 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=54d23de51656df3f41c86816f4ca3b66e9a60425;p=mit-scheme.git microcode/option.c (string_copy_limited): Null-terminate result. --- diff --git a/src/microcode/option.c b/src/microcode/option.c index 7cee60bef..021f6ba80 100644 --- a/src/microcode/option.c +++ b/src/microcode/option.c @@ -302,6 +302,7 @@ string_copy_limited (const char * s, const char * e) unsigned int n_chars = (e - s); char * result = (OS_malloc (n_chars + 1)); strncpy (result, s, n_chars); + result[n_chars] = '\0'; return (result); }