Pull up following revision(s) (requested by rin in ticket #1636):

sys/lib/libsa/subr_prf.c: revision 1.30

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...
This commit is contained in:
martin 2023-06-03 14:35:18 +00:00
parent 1ab296f0e8
commit ac5c0db93c
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr_prf.c,v 1.28 2019/02/03 11:59:43 mrg Exp $ */
/* $NetBSD: subr_prf.c,v 1.28.4.1 2023/06/03 14:35:18 martin Exp $ */
/*-
* Copyright (c) 1993
@ -202,6 +202,7 @@ reswitch:
break;
++fmt;
}
goto reswitch;
#endif
case 'l':
#ifdef LIBSA_PRINTF_LONGLONG_SUPPORT