Printf inconsistency when handed null string
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-4.3 (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Binary package hint: libc6
This happens both on AMD 64 and i386 of Ubuntu 7.10.
The following c code will segfault:
printf("%s\n", NULL);
The following code will just output "(null)":
printf("%s \n", NULL);
The distinction is the space between the %s and the \n.
I believe the error is in libc6 2.6.1-1ubuntu1. I haven't tested earlier version. A quick peek at the original source package shows that glibc-2.
I'm willing to provide more information to help solve this issue.
Changed in glibc: | |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in gcc-4.3 (Ubuntu): | |
status: | Triaged → Confirmed |
Small correction: vfprintf.c not vprintf.c. Sorry for the typo.