Don't access non-existing element buf[256], use buf[255] instead.

Submitted by: draslar <draslar@elray.ch>
This commit is contained in:
Bodo Möller 2000-12-20 10:11:06 +00:00
parent 1456d1860e
commit 60f7492646

View File

@ -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);