forked from mirror/dmidecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mmap will fail with SIGBUS if trying to map a non-existent portion of a file. While this should never happen with /dev/mem, it can happen if passing a regular file with option -d. While people should no longer do that, failure gracefully seems better than crashing. So check for the file size before calling mmap. This closes bug #46066: http://savannah.nongnu.org/bugs/?46066
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 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