-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang][analyzer] No end-of-file when seek to file begin.
If `fseek` is used with 0 position and SEEK_SET it sets the position to the start of the file. This should not cause FEOF (end of file) error. The case of an empty file is not handled for simplification. It is not exactly defined in what cases `fseek` produces the different error states. Normally feof should not happen at all because it is possible to set the position after the end of file, but previous tests showed that still feof (and any other error cases) can happen. Reviewed By: donat.nagy Differential Revision: https://reviews.llvm.org/D153363
- Loading branch information
Showing
2 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters