Summary

simple-sha1's sha1sum segfaults when passed a directory

Metadata

Attachments

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