libsa/printf: Do not fetch long va_arg as long long.
This does real harm iff all of the following conditions are satisfied: (1) On ILP32 architectures. (2) Both LIBSA_PRINTF_LONGLONG_SUPPORT and LIBSA_PRINTF_WIDTH_SUPPORT compile-time options are enabled. (3) Width field is used with 'l' modifier. This is an implicit-fallthrough bug, but unfortunately, GCC 10.4 cannot find this out somehow... XXX Pull up to netbsd-10 and netbsd-9. netbsd-8 is not affected.
This commit is contained in:
parent
d2813c5205
commit
9bacf14f2a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subr_prf.c,v 1.29 2020/06/06 15:45:47 thorpej Exp $ */
|
||||
/* $NetBSD: subr_prf.c,v 1.30 2023/05/29 03:56:52 rin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -209,6 +209,7 @@ reswitch:
|
|||
break;
|
||||
++fmt;
|
||||
}
|
||||
goto reswitch;
|
||||
#endif
|
||||
case 'l':
|
||||
#ifdef LIBSA_PRINTF_LONGLONG_SUPPORT
|
||||
|
|
Loading…
Reference in New Issue