projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug fix.
[openssl.git]
/
crypto
/
bio
/
b_print.c
diff --git
a/crypto/bio/b_print.c
b/crypto/bio/b_print.c
index 80dc162ccf34bd7f37073cabccab16045c3d558a..21248fbb3bdb1e43503baae5f70963b7ae9ed804 100644
(file)
--- a/
crypto/bio/b_print.c
+++ b/
crypto/bio/b_print.c
@@
-64,13
+64,15
@@
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
-#include <sys/types.h>
#include "cryptlib.h"
#include "cryptlib.h"
+#ifndef NO_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#include <openssl/bio.h>
#ifdef BN_LLONG
# ifndef HAVE_LONG_LONG
#include <openssl/bio.h>
#ifdef BN_LLONG
# ifndef HAVE_LONG_LONG
-# define HAVE_LONG_LONG
+# define HAVE_LONG_LONG
1
# endif
#endif
# endif
#endif
@@
-82,14
+84,15
@@
int BIO_printf (BIO *bio, ...)
va_list args;
char *format;
int ret;
va_list args;
char *format;
int ret;
+ size_t retlen;
MS_STATIC char hugebuf[1024*2]; /* 10k in one chunk is the limit */
va_start(args, bio);
format=va_arg(args, char *);
hugebuf[0]='\0';
MS_STATIC char hugebuf[1024*2]; /* 10k in one chunk is the limit */
va_start(args, bio);
format=va_arg(args, char *);
hugebuf[0]='\0';
- dopr(hugebuf, sizeof(hugebuf), &ret, format, args);
- ret=BIO_write(bio, hugebuf,
ret
);
+ dopr(hugebuf, sizeof(hugebuf), &ret
len
, format, args);
+ ret=BIO_write(bio, hugebuf,
(int)retlen
);
va_end(args);
return(ret);
va_end(args);
return(ret);
@@
-289,7
+292,7
@@
dopr(
case 'i':
switch (cflags) {
case DP_C_SHORT:
case 'i':
switch (cflags) {
case DP_C_SHORT:
- value =
va_arg(args, short
int);
+ value =
(short int)va_arg(args,
int);
break;
case DP_C_LONG:
value = va_arg(args, long int);
break;
case DP_C_LONG:
value = va_arg(args, long int);
@@
-312,8
+315,7
@@
dopr(
flags |= DP_F_UNSIGNED;
switch (cflags) {
case DP_C_SHORT:
flags |= DP_F_UNSIGNED;
switch (cflags) {
case DP_C_SHORT:
- value = va_arg(args,
- unsigned short int);
+ value = (unsigned short int)va_arg(args, unsigned int);
break;
case DP_C_LONG:
value = (LLONG) va_arg(args,
break;
case DP_C_LONG:
value = (LLONG) va_arg(args,