| Summary: | fgets() and fread() on file without reading rights leads to SEGV | ||
|---|---|---|---|
| Product: | Base System | Reporter: | chucha <chucha> |
| Component: | misc | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
chucha
2000-07-17 08:20:01 UTC
Read the man page for fopen(). It returns NULL if the file can't be opened. fread() (and fgets(), and even feof() etc) can only be used on valid filehandles. This PR can be closed. State Changed From-To: open->closed Pilot error - see audit trail: fopen() returns NULL if non-readable, and thus the SEGV. |