Bug#729514: libc6: fwprintf() doesn't print "(nil)" for NULL pointer and L"%p" format string
Package: libc6
Version: 2.13-38
Severity: normal
Dear Maintainer,
when I'm using wprintf() family function (wprintf, fwprintf, ...) with L"%p" format conversion and NULL value parameter, the string "(" (instead of "(nil)") is printed to the output.
Example:
Source:
#include <stddef.h>
#include <stdio.h>
#include <wchar.h>
int main( int argc, char * argv[] ) {
fprintf( stderr, "narrow pointer: %p\n", NULL );
fwprintf( stdout, L"wide pointer: %p\n", NULL );
return 0;
}
Requested output:
narrow pointer p: (nil)
wide pointer p: (nil)
Real output:
narrow pointer p: (nil)
wide pointer p: (
Result:
Probably (I didn't test it) "forgotten" line
is_long = 0; /* This is no wide-char string. */ \
in process_arg() macro declaration in file stdio_common/vfprintf.c
Thanks for reparation
Jan
-- System Information:
Debian Release: 7.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libc6 depends on:
ii libc-bin 2.13-38
ii libgcc1 1:4.7.2-5
libc6 recommends no packages.
Versions of packages libc6 suggests:
ii debconf [debconf-2.0] 1.5.49
pn glibc-doc <none>
ii locales 2.13-38
-- debconf information:
glibc/upgrade: true
glibc/restart-services:
libraries/restart-without-asking: false
glibc/disable-screensaver:
glibc/restart-failed:
Reply to: