diff options
author | sem <sem@FreeBSD.org> | 2005-07-21 09:43:26 +0000 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2005-07-21 09:43:26 +0000 |
commit | 7478688a42461e5425755fc5a89467a7df35b3a5 (patch) | |
tree | 40a9161a4d5b82a09c906bf86f6767b6f3af863d /security/digest | |
parent | 91c51c6c9ed5782d8bafd07e1467881c5d617001 (diff) | |
download | FreeBSD-ports-7478688a42461e5425755fc5a89467a7df35b3a5.zip FreeBSD-ports-7478688a42461e5425755fc5a89467a7df35b3a5.tar.gz |
- Fix a bug in SHA256
PR: ports/76289
Reported by: Kenichi Morioka <morioka@openloop.co.jp>
Fixed by: Vsevolod Stakhov <vsevolod@highsecure.ru> (maintainer)
Diffstat (limited to 'security/digest')
-rw-r--r-- | security/digest/Makefile | 1 | ||||
-rw-r--r-- | security/digest/files/patch-sha2.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/security/digest/Makefile b/security/digest/Makefile index 7e0e228..b44e750 100644 --- a/security/digest/Makefile +++ b/security/digest/Makefile @@ -8,6 +8,7 @@ PORTNAME?= digest PORTVERSION?= 20050323 +PORTREVISION= 1 CATEGORIES?= security sysutils MASTER_SITES?= http://highsecure.ru/ diff --git a/security/digest/files/patch-sha2.c b/security/digest/files/patch-sha2.c new file mode 100644 index 0000000..bedf3e5 --- /dev/null +++ b/security/digest/files/patch-sha2.c @@ -0,0 +1,11 @@ +--- sha2.c.orig Thu Jul 21 00:39:56 2005 ++++ sha2.c Thu Jul 21 02:30:00 2005 +@@ -588,7 +588,7 @@ + /* Begin padding with a 1 bit: */ + context->buffer[usedspace++] = 0x80; + +- if (usedspace < SHA256_SHORT_BLOCK_LENGTH) { ++ if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) { + /* Set-up for the last transform: */ + MEMSET_BZERO(&context->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace); + } else { |