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 @@ | |||
2 | - (djm) Added /etc/primes for kex DH group neg, fixup Makefile.in and | 2 | - (djm) Added /etc/primes for kex DH group neg, fixup Makefile.in and |
3 | packaging files | 3 | packaging files |
4 | - (djm) Fix new Makefile.in warnings | 4 | - (djm) Fix new Makefile.in warnings |
5 | - (djm) Fix vsprintf("%h") in bsd-snprintf.c, short int va_args are | ||
6 | promoted to type int. Report and fix from Dan Astoorian | ||
7 | <djast@cs.toronto.edu> | ||
5 | 8 | ||
6 | 20001110 | 9 | 20001110 |
7 | - (bal) Fixed dropped answer from skey_keyinfo() in auth1.c | 10 | - (bal) Fixed dropped answer from skey_keyinfo() in auth1.c |
diff --git a/bsd-snprintf.c b/bsd-snprintf.c index 3a82a586f..59fefbf25 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) | |||
260 | case 'd': | 260 | case 'd': |
261 | case 'i': | 261 | case 'i': |
262 | if (cflags == DP_C_SHORT) | 262 | if (cflags == DP_C_SHORT) |
263 | value = va_arg (args, short int); | 263 | value = va_arg (args, int); |
264 | else if (cflags == DP_C_LONG) | 264 | else if (cflags == DP_C_LONG) |
265 | value = va_arg (args, long int); | 265 | value = va_arg (args, long int); |
266 | else if (cflags == DP_C_LONG_LONG) | 266 | 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) | |||
272 | case 'o': | 272 | case 'o': |
273 | flags |= DP_F_UNSIGNED; | 273 | flags |= DP_F_UNSIGNED; |
274 | if (cflags == DP_C_SHORT) | 274 | if (cflags == DP_C_SHORT) |
275 | value = va_arg (args, unsigned short int); | 275 | value = va_arg (args, unsigned int); |
276 | else if (cflags == DP_C_LONG) | 276 | else if (cflags == DP_C_LONG) |
277 | value = va_arg (args, unsigned long int); | 277 | value = va_arg (args, unsigned long int); |
278 | else if (cflags == DP_C_LONG_LONG) | 278 | 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) | |||
284 | case 'u': | 284 | case 'u': |
285 | flags |= DP_F_UNSIGNED; | 285 | flags |= DP_F_UNSIGNED; |
286 | if (cflags == DP_C_SHORT) | 286 | if (cflags == DP_C_SHORT) |
287 | value = va_arg (args, unsigned short int); | 287 | value = va_arg (args, unsigned int); |
288 | else if (cflags == DP_C_LONG) | 288 | else if (cflags == DP_C_LONG) |
289 | value = va_arg (args, unsigned long int); | 289 | value = va_arg (args, unsigned long int); |
290 | else if (cflags == DP_C_LONG_LONG) | 290 | 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) | |||
298 | case 'x': | 298 | case 'x': |
299 | flags |= DP_F_UNSIGNED; | 299 | flags |= DP_F_UNSIGNED; |
300 | if (cflags == DP_C_SHORT) | 300 | if (cflags == DP_C_SHORT) |
301 | value = va_arg (args, unsigned short int); | 301 | value = va_arg (args, unsigned int); |
302 | else if (cflags == DP_C_LONG) | 302 | else if (cflags == DP_C_LONG) |
303 | value = va_arg (args, unsigned long int); | 303 | value = va_arg (args, unsigned long int); |
304 | else if (cflags == DP_C_LONG_LONG) | 304 | else if (cflags == DP_C_LONG_LONG) |