Summary
simple-sha1's sha1sum segfaults when passed a directory
Metadata
- Id: 1002ea5fef9d62da21e89f52f38f975d0a7eacc9
- Trac id: 664
- Type: defect
- Reporter: ckeen
- Owner: felix
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone: 4.9.0
- Version: 4.7.x
- Changetime: 2012-09-24 21:47:48 UTC
- Created: 2011-07-30 13:19:00 UTC
- Keywords: sha1sum segfault save-the-robots
Attachments
- 1002ea5fef9d62da21e89f52f38f975d0a7eacc9/attachments/fix_sha1.patch
Description
When passing a nonexistent path to sha1sum file-open returns an error. However if the programmer is stupid and passes a directory to sha1sum it segfaults due to the mmaping stuff.
The attached patch changes the sha1sum behaviour to return #f on a nonexistant file or being passed a directory.
Changes and comments
[2011-07-30 13:20:25 UTC] ckeen attached fix_sha1.patch (description=patch to return #f on filename being a directory or nonexistent file)
[2011-08-01 09:00:27 UTC] felix changed status from new to closed
[2011-08-01 09:00:27 UTC] felix set resolution to fixed
[2011-08-01 09:00:27 UTC] felix wrote:
Thanks!
[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0
[2012-09-24 21:47:48 UTC] felix wrote:
Milestone 4.8.0 deleted