Bug 816366
Summary: | fclose crashes instead of returning an error | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | John Wendel <john.wendel> |
Component: | glibc | Assignee: | Jeff Law <law> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | 16 | CC: | fweimer, jakub, law, schwab |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | athlon | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-04-25 21:58:28 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
John Wendel
2012-04-25 21:42:39 UTC
GLIBC's behaviour is valid according to ISO C standard 7.1.4. "If an argument to a function has an invalid value (such as a value outside the domain of the function, or a pointer outside the address space of the program, or a null pointer... the behaviour is undefined". The rationale behind this is it's generally impossible to determine if a particular pointer value is a valid pointer and points to memory of the correct data type. Clearly you need to be checking the result of your fopen call to ensure it's non-null. |