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:
68e5753
)
Fix typo and purify logic in b_sock.c
author
Andy Polyakov
<appro@openssl.org>
Mon, 2 Jan 2006 12:26:36 +0000
(12:26 +0000)
committer
Andy Polyakov
<appro@openssl.org>
Mon, 2 Jan 2006 12:26:36 +0000
(12:26 +0000)
crypto/bio/b_sock.c
patch
|
blob
|
history
diff --git
a/crypto/bio/b_sock.c
b/crypto/bio/b_sock.c
index 26aa9dc8dabd56c739bdc97228c5d5481a68ffbf..bbf627de55fb513d2dab9eefb220d49947e4e929 100644
(file)
--- a/
crypto/bio/b_sock.c
+++ b/
crypto/bio/b_sock.c
@@
-802,10
+802,10
@@
int BIO_accept(int sock, char **addr)
if ((*getnameinfo.f)(&from,sizeof(from),h,sizeof(h),s,sizeof(s),
NI_NUMERICHOST|NI_NUMERICSERV)) break;
- l = strlen(h)+strlen(
p
)+2; if (len<24) len=24;
+ l = strlen(h)+strlen(
s
)+2; if (len<24) len=24;
p = *addr;
- if (p)
p = OPENSSL_realloc(p,l);
- else
p = OPENSSL_malloc(l);
+ if (p)
{ *p = '\0'; p = OPENSSL_realloc(p,l); }
+ else
{ p = OPENSSL_malloc(l); }
if (p==NULL)
{
BIOerr(BIO_F_BIO_ACCEPT,ERR_R_MALLOC_FAILURE);