public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug glob/28525] New: glob segfaults when arg pglob->gl_lstat is NULL
@ 2021-11-01 17:58 spk121 at yahoo dot com
  0 siblings, 0 replies; only message in thread
From: spk121 at yahoo dot com @ 2021-11-01 17:58 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 28525
           Summary: glob segfaults when arg pglob->gl_lstat is NULL
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: glob
          Assignee: unassigned at sourceware dot org
          Reporter: spk121 at yahoo dot com
  Target Milestone: ---

Hello. I was using glob and created a segfault by leaving the pglob->gl_lstat
argument NULL improperly.
Posix does say that "It is the caller's responsibility to create the structure
pointed to by pglob." So segfault *is* a valid response.
But since your implementation does set errno and return for some error cases
not explicitly called out in POSIX, perhaps a null check and errno response
could be a good enhancement.
Thanks.

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-01 17:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-01 17:58 [Bug glob/28525] New: glob segfaults when arg pglob->gl_lstat is NULL spk121 at yahoo 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).