From: Bodo Möller Date: Wed, 20 Dec 2000 10:11:06 +0000 (+0000) Subject: Don't access non-existing element buf[256], use buf[255] instead. X-Git-Tag: OpenSSL_0_9_6a-beta1~81^2~113 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=60f7492646cdebf12422aecb2cce29418ca105be;p=oweals%2Fopenssl.git Don't access non-existing element buf[256], use buf[255] instead. Submitted by: draslar --- diff --git a/crypto/lhash/lh_test.c b/crypto/lhash/lh_test.c index 6008781e57..0758d88372 100644 --- a/crypto/lhash/lh_test.c +++ b/crypto/lhash/lh_test.c @@ -75,7 +75,7 @@ main() buf[0]='\0'; fgets(buf,256,stdin); if (buf[0] == '\0') break; - buf[256]='\0'; + buf[255]='\0'; i=strlen(buf); p=OPENSSL_malloc(i+1); memcpy(p,buf,i+1);