mirror of
git://git.musl-libc.org/musl
synced 2024-12-15 11:15:07 +00:00
fix printf %n specifier - missing breaks had it clobbering memory
This commit is contained in:
parent
e3657ba599
commit
5cbd76c6b0
@ -526,13 +526,13 @@ static int printf_core(FILE *f, const char *fmt, va_list *ap, union arg *nl_arg,
|
||||
switch(t) {
|
||||
case 'n':
|
||||
switch(ps) {
|
||||
case BARE: *(int *)arg.p = l;
|
||||
case LPRE: *(long *)arg.p = l;
|
||||
case LLPRE: *(long long *)arg.p = l;
|
||||
case HPRE: *(unsigned short *)arg.p = l;
|
||||
case HHPRE: *(unsigned char *)arg.p = l;
|
||||
case ZTPRE: *(size_t *)arg.p = l;
|
||||
case JPRE: *(uintmax_t *)arg.p = l;
|
||||
case BARE: *(int *)arg.p = l; break;
|
||||
case LPRE: *(long *)arg.p = l; break;
|
||||
case LLPRE: *(long long *)arg.p = l; break;
|
||||
case HPRE: *(unsigned short *)arg.p = l; break;
|
||||
case HHPRE: *(unsigned char *)arg.p = l; break;
|
||||
case ZTPRE: *(size_t *)arg.p = l; break;
|
||||
case JPRE: *(uintmax_t *)arg.p = l; break;
|
||||
}
|
||||
continue;
|
||||
case 'p':
|
||||
|
Loading…
Reference in New Issue
Block a user