This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug stdio/21534] New: vfprintf: user-defined specifiers with multiple arguments broken with positional arguments


https://sourceware.org/bugzilla/show_bug.cgi?id=21534

            Bug ID: 21534
           Summary: vfprintf: user-defined specifiers with multiple
                    arguments broken with positional arguments
           Product: glibc
           Version: 2.25
            Status: NEW
          Severity: normal
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---
             Flags: security-

Created attachment 10077
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10077&action=edit
tst-vfprintf-user-type.c

If %P has an arginfo function which requests more than one argument, and it is
used as a positional argument specified (%1$P), the additional arguments are
not taken into account when computing the total number of arguments in
vfprintf/printf_positional (and possibly the offsets as well).

This means that the last subtest in the attached test program crashes.

This could perhaps be a documentation issue.  It is not entirely clear how
positional indexes would be determined if a format specifier consumes multiple
arguments.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]