[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BUG: printf formatting libc.so.6
From: |
Bruce Korb |
Subject: |
BUG: printf formatting libc.so.6 |
Date: |
Sun, 25 May 2003 12:05:38 -0700 |
/* This program fails */
#include <stdio.h>
static const char zSamp[] =
"ch1: 49 ('1') -- ch2: 32 (' ')";
static char zBuff[ 128 ];
int
main( int argc, char** argv )
{
static const char zFmt[] = "ch1: %1$d ('%1$c') -- ch2: %2$d ('%2$c')\n";
sprintf( zBuff, zFmt, 0x31, 32 );
fputs( zBuff, stdout );
return strcmp( zBuff, zSamp ) == 0;
}
- BUG: printf formatting libc.so.6,
Bruce Korb <=