From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A6C9F3858432; Mon, 1 Nov 2021 17:58:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A6C9F3858432 From: "spk121 at yahoo dot com" To: glibc-bugs@sourceware.org Subject: [Bug glob/28525] New: glob segfaults when arg pglob->gl_lstat is NULL Date: Mon, 01 Nov 2021 17:58:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: glob X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: spk121 at yahoo dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Nov 2021 17:58:50 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28525 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_lst= at argument NULL improperly. Posix does say that "It is the caller's responsibility to create the struct= ure 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. --=20 You are receiving this mail because: You are on the CC list for the bug.=