public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/19038] New: argp.doc prints incorrectly when it starts with "\v"
@ 2015-10-01  0:36 kstauffer at gmail dot com
  2015-10-01  0:39 ` [Bug libc/19038] " kstauffer at gmail dot com
  2015-10-01  1:05 ` kstauffer at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: kstauffer at gmail dot com @ 2015-10-01  0:36 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 19038
           Summary: argp.doc prints incorrectly when it starts with "\v"
           Product: glibc
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: kstauffer at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Created attachment 8661
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8661&action=edit
A argp parser whose ``doc" members starts with '\v'

The attached program has a root argp parser with a "doc" member of "\vAfter"
but this is what "b --help" prints:

Usage: b [OPTION...]

After

  -?, --help                 Give this help list
      --usage                Give a short usage message

After

The first occurrence of "After" is erroneous.

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/19038] argp.doc prints incorrectly when it starts with "\v"
  2015-10-01  0:36 [Bug libc/19038] New: argp.doc prints incorrectly when it starts with "\v" kstauffer at gmail dot com
@ 2015-10-01  0:39 ` kstauffer at gmail dot com
  2015-10-01  1:05 ` kstauffer at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: kstauffer at gmail dot com @ 2015-10-01  0:39 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from Kenny Stauffer <kstauffer at gmail dot com> ---
It looks like the error stems from the argp_doc function. This section:

1469      if (doc)
1470        {
1471          char *vt = strchr (doc, '\v');
1472          inp_text = post ? (vt ? vt + 1 : 0) : doc;
1473          inp_text_limit = (!post && vt) ? (vt - doc) : 0;
1474        }

When processing what should come before the '\v', this section sets inp_text =
doc and inp_text_limit = 0. That value of inp_text_limit is interpreted later
to mean "print the whole string."

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/19038] argp.doc prints incorrectly when it starts with "\v"
  2015-10-01  0:36 [Bug libc/19038] New: argp.doc prints incorrectly when it starts with "\v" kstauffer at gmail dot com
  2015-10-01  0:39 ` [Bug libc/19038] " kstauffer at gmail dot com
@ 2015-10-01  1:05 ` kstauffer at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: kstauffer at gmail dot com @ 2015-10-01  1:05 UTC (permalink / raw)
  To: glibc-bugs

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

Kenny Stauffer <kstauffer at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kstauffer at gmail dot com

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-01  1:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-01  0:36 [Bug libc/19038] New: argp.doc prints incorrectly when it starts with "\v" kstauffer at gmail dot com
2015-10-01  0:39 ` [Bug libc/19038] " kstauffer at gmail dot com
2015-10-01  1:05 ` kstauffer at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).