summaryrefslogtreecommitdiff
path: root/lib/libcrypto/buffer
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2002-05-15 02:29:22 +0000
committerBob Beck <beck@cvs.openbsd.org>2002-05-15 02:29:22 +0000
commit4df88d25cb3419048d1bcf9740d37d4c459aef22 (patch)
tree97858aa44644bc9b64d1775a8bbccfb5baca24d3 /lib/libcrypto/buffer
parent998d0d156e423800e9a2fa1a482c0726f14201c2 (diff)
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'lib/libcrypto/buffer')
-rw-r--r--lib/libcrypto/buffer/Makefile.ssl21
-rw-r--r--lib/libcrypto/buffer/buf_err.c4
-rw-r--r--lib/libcrypto/buffer/buffer.c3
-rw-r--r--lib/libcrypto/buffer/buffer.h4
4 files changed, 16 insertions, 16 deletions
diff --git a/lib/libcrypto/buffer/Makefile.ssl b/lib/libcrypto/buffer/Makefile.ssl
index a64681fd226..b8b64395034 100644
--- a/lib/libcrypto/buffer/Makefile.ssl
+++ b/lib/libcrypto/buffer/Makefile.ssl
@@ -5,13 +5,14 @@
DIR= buffer
TOP= ../..
CC= cc
-INCLUDES= -I.. -I../../include
+INCLUDES= -I.. -I$(TOP) -I../../include
CFLAG=-g
INSTALL_PREFIX=
OPENSSLDIR= /usr/local/ssl
INSTALLTOP=/usr/local/ssl
MAKE= make -f Makefile.ssl
-MAKEDEPEND= $(TOP)/util/domd $(TOP)
+MAKEDEPPROG= makedepend
+MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
MAKEFILE= Makefile.ssl
AR= ar r
@@ -39,8 +40,7 @@ all: lib
lib: $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
- @echo You may get an error following this line. Please ignore.
- - $(RANLIB) $(LIB)
+ $(RANLIB) $(LIB) || echo Never mind.
@touch lib
files:
@@ -80,14 +80,15 @@ clean:
# DO NOT DELETE THIS LINE -- make depend depends on it.
buf_err.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
-buf_err.o: ../../include/openssl/crypto.h ../../include/openssl/err.h
-buf_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslv.h
+buf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
+buf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
+buf_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
buf_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-buf_err.o: ../../include/openssl/symhacks.h
-buffer.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
-buffer.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h
+buf_err.o: ../../include/openssl/symhacks.h buf_err.c
+buffer.o: ../../e_os.h ../../include/openssl/bio.h
+buffer.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
buffer.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
buffer.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
buffer.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
buffer.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-buffer.o: ../cryptlib.h
+buffer.o: ../cryptlib.h buffer.c
diff --git a/lib/libcrypto/buffer/buf_err.c b/lib/libcrypto/buffer/buf_err.c
index 2f971a5f38b..5eee653e14d 100644
--- a/lib/libcrypto/buffer/buf_err.c
+++ b/lib/libcrypto/buffer/buf_err.c
@@ -63,7 +63,7 @@
#include <openssl/buffer.h>
/* BEGIN ERROR CODES */
-#ifndef NO_ERR
+#ifndef OPENSSL_NO_ERR
static ERR_STRING_DATA BUF_str_functs[]=
{
{ERR_PACK(0,BUF_F_BUF_MEM_GROW,0), "BUF_MEM_grow"},
@@ -86,7 +86,7 @@ void ERR_load_BUF_strings(void)
if (init)
{
init=0;
-#ifndef NO_ERR
+#ifndef OPENSSL_NO_ERR
ERR_load_strings(ERR_LIB_BUF,BUF_str_functs);
ERR_load_strings(ERR_LIB_BUF,BUF_str_reasons);
#endif
diff --git a/lib/libcrypto/buffer/buffer.c b/lib/libcrypto/buffer/buffer.c
index b76ff3ad7ac..9299baba9e2 100644
--- a/lib/libcrypto/buffer/buffer.c
+++ b/lib/libcrypto/buffer/buffer.c
@@ -118,8 +118,9 @@ int BUF_MEM_grow(BUF_MEM *str, int len)
else
{
str->data=ret;
- str->length=len;
str->max=n;
+ memset(&str->data[str->length],0,len-str->length);
+ str->length=len;
}
return(len);
}
diff --git a/lib/libcrypto/buffer/buffer.h b/lib/libcrypto/buffer/buffer.h
index bff26bf3919..11e2d0359a1 100644
--- a/lib/libcrypto/buffer/buffer.h
+++ b/lib/libcrypto/buffer/buffer.h
@@ -75,12 +75,11 @@ void BUF_MEM_free(BUF_MEM *a);
int BUF_MEM_grow(BUF_MEM *str, int len);
char * BUF_strdup(const char *str);
-void ERR_load_BUF_strings(void );
-
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
* made after this point may be overwritten when the script is next run.
*/
+void ERR_load_BUF_strings(void);
/* Error codes for the BUF functions. */
@@ -95,4 +94,3 @@ void ERR_load_BUF_strings(void );
}
#endif
#endif
-