git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [BUG] ls-files showing deleted files (unchecked lstat return value)
@ 2019-02-17 13:49 Joe Ranieri
  2019-02-17 15:59 ` Randall S. Becker
  2019-02-18 15:17 ` SZEDER Gábor
  0 siblings, 2 replies; 6+ messages in thread
From: Joe Ranieri @ 2019-02-17 13:49 UTC (permalink / raw)
  To: git

"git ls-files -m" can show deleted files, despite -d not having been 
specified. This is due to ls-files.c's show_files function calling lstat 
but not checking the return value before calling ie_modified with the 
uninitialized stat structure.

This problem was found using the static analysis tool GrammaTech CodeSonar.

-- 
Thanks and Regards,
Joe Ranieri
Software Engineer
GrammaTech, Inc.

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

end of thread, other threads:[~2019-02-20 22:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-17 13:49 [BUG] ls-files showing deleted files (unchecked lstat return value) Joe Ranieri
2019-02-17 15:59 ` Randall S. Becker
2019-02-18 14:09   ` Joe Ranieri
2019-02-18 15:17 ` SZEDER Gábor
2019-02-18 16:14   ` Randall S. Becker
2019-02-20 22:51   ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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).