vscanf defined incorrectly for non-GNU compilers in stdio.h when strict C99 or POSIX set

Bug #234893 reported by Jared Showalter on 2008-05-26
14
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
Undecided
Unassigned
Hardy
Undecided
Unassigned

Bug Description

This is Ubuntu 8.04, libc6-dev 2.7-10ubuntu3.
The file /usr/include/stdio.h has a typo or line 495, as "__isoc99_vsscanf" should be "__isoc99_vscanf". For context:

# if !defined __USE_GNU \
     && (!defined __LDBL_COMPAT || !defined __REDIRECT) \
     && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
# ifdef __REDIRECT
[snip]
# else
extern int __isoc99_vfscanf (FILE *__restrict __s,
        __const char *__restrict __format,
        _G_va_list __arg) __wur;
extern int __isoc99_vscanf (__const char *__restrict __format,
       _G_va_list __arg) __wur;
extern int __isoc99_vsscanf (__const char *__restrict __s,
        __const char *__restrict __format,
        _G_va_list __arg) __THROW;
# define vfscanf __isoc99_vfscanf
# define vscanf __isoc99_vsscanf /* bad line */
# define vsscanf __isoc99_vsscanf
# endif
# endif

You can see both vscanf and vsscanf are defined to the same thing, and vscanf is wrong.
This affects non-GNU compilers where the user wants strict C99 or POSIX.

Matthias Klose (doko) wrote :

fixed in intrepid

Changed in glibc:
status: New → In Progress
status: New → Fix Released
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in glibc:
status: In Progress → Fix Committed

I reinstalled libc6-dev 2.7-10ubuntu3 to verify my original case stopped working as expected (versus my local change). Then I updated to the glibc packages from -proposed and verified that my original case works from a clean build.

Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in glibc:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers