diff options
author | Damien Miller <djm@mindrot.org> | 2000-11-11 09:03:32 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-11-11 09:03:32 +1100 |
commit | 9f4f7552ee994634cc79a6f90ae4e9347f536cec (patch) | |
tree | 8323e9e1da25a5267527103c579c682bb24c81fd | |
parent | 29abb1b6a91dbda9bd7f6b9d4ae8ff4164d2f2d1 (diff) |
- (djm) Fix vsprintf("%h") in bsd-snprintf.c, short int va_args are
promoted to type int. Report and fix from Dan Astoorian
<djast@cs.toronto.edu>
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | bsd-snprintf.c | 8 |
2 files changed, 7 insertions, 4 deletions
@@ -2,6 +2,9 @@ - (djm) Added /etc/primes for kex DH group neg, fixup Makefile.in and packaging files - (djm) Fix new Makefile.in warnings + - (djm) Fix vsprintf("%h") in bsd-snprintf.c, short int va_args are + promoted to type int. Report and fix from Dan Astoorian + <djast@cs.toronto.edu> 20001110 - (bal) Fixed dropped answer from skey_keyinfo() in auth1.c diff --git a/bsd-snprintf.c b/bsd-snprintf.c index 3a82a586..59fefbf2 100644 --- a/bsd-snprintf.c +++ b/bsd-snprintf.c @@ -260,7 +260,7 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) case 'd': case 'i': if (cflags == DP_C_SHORT) - value = va_arg (args, short int); + value = va_arg (args, int); else if (cflags == DP_C_LONG) value = va_arg (args, long int); else if (cflags == DP_C_LONG_LONG) @@ -272,7 +272,7 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) case 'o': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) - value = va_arg (args, unsigned short int); + value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = va_arg (args, unsigned long int); else if (cflags == DP_C_LONG_LONG) @@ -284,7 +284,7 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) case 'u': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) - value = va_arg (args, unsigned short int); + value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = va_arg (args, unsigned long int); else if (cflags == DP_C_LONG_LONG) @@ -298,7 +298,7 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) case 'x': flags |= DP_F_UNSIGNED; if (cflags == DP_C_SHORT) - value = va_arg (args, unsigned short int); + value = va_arg (args, unsigned int); else if (cflags == DP_C_LONG) value = va_arg (args, unsigned long int); else if (cflags == DP_C_LONG_LONG) |