projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a02757
)
Make sure to NUL-terminate the string on end-of-file (and error)
author
Richard Levitte
<levitte@openssl.org>
Wed, 11 Jun 2003 18:43:47 +0000
(18:43 +0000)
committer
Richard Levitte
<levitte@openssl.org>
Wed, 11 Jun 2003 18:43:47 +0000
(18:43 +0000)
PR: 643
crypto/bio/bf_buff.c
patch
|
blob
|
history
diff --git
a/crypto/bio/bf_buff.c
b/crypto/bio/bf_buff.c
index c90238bae1e1cddb101a41230f43079b0bf7e60e..3226f5faf99c335bac58e70562b8ef6515ae35e4 100644
(file)
--- a/
crypto/bio/bf_buff.c
+++ b/
crypto/bio/bf_buff.c
@@
-169,6
+169,7
@@
start:
if (i <= 0)
{
BIO_copy_next_retry(b);
+ *buf='\0';
if (i < 0) return((num > 0)?num:i);
if (i == 0) return(num);
}
@@
-495,6
+496,9
@@
static int buffer_gets(BIO *b, char *buf, int size)
if (i <= 0)
{
BIO_copy_next_retry(b);
+ *buf='\0';
+ fprintf(stderr, "DEBUG[buffer_gets]: i = %d\n",
+ i);
if (i < 0) return((num > 0)?num:i);
if (i == 0) return(num);
}