Patch from Scott McKellar to protect SHA-1 against an off-by-one bug