Fix OS/2-specific buffer overflow
Ilya Zakharevich [Wed, 30 Apr 1997 19:20:01 +0000 (15:20 -0400)]
private-msgid: 199704301920.PAA09681@monk.mps.ohio-state.edu

os2/os2.c

index b658ea8..c45dfec 100644 (file)
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -321,7 +321,7 @@ int execf;
     if (strnEQ(cmd,"/bin/sh",7) && isSPACE(cmd[7])) {
        STRLEN l = strlen(sh_path);
        
-       New(1302, news, strlen(cmd) - 7 + l, char);
+       New(1302, news, strlen(cmd) - 7 + l + 1, char);
        strcpy(news, sh_path);
        strcpy(news + l, cmd + 7);
        cmd = news;