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 /bsd-snprintf.c | |
parent | 29abb1b6a91dbda9bd7f6b9d4ae8ff4164d2f2d1 (diff) | |
download | openssh-git-9f4f7552ee994634cc79a6f90ae4e9347f536cec.tar.gz |
- (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>
Diffstat (limited to 'bsd-snprintf.c')
-rw-r--r-- | bsd-snprintf.c | 8 |
1 files changed, 4 insertions, 4 deletions
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) |