Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#664 closed defect (fixed)

simple-sha1's sha1sum segfaults when passed a directory

Reported by: Christian Kellermann Owned by: felix winkelmann
Priority: major Milestone: 4.9.0
Component: extensions Version: 4.7.x
Keywords: sha1sum segfault save-the-robots Cc:
Estimated difficulty:

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.

Attachments (1)

fix_sha1.patch (643 bytes) - added by Christian Kellermann 13 years ago.
patch to return #f on filename being a directory or nonexistent file

Download all attachments as: .zip

Change History (3)

Changed 13 years ago by Christian Kellermann

Attachment: fix_sha1.patch added

patch to return #f on filename being a directory or nonexistent file

comment:1 Changed 13 years ago by felix winkelmann

Resolution: fixed
Status: newclosed

Thanks!

comment:2 Changed 12 years ago by felix winkelmann

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.