[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Alignment issue with sha1 code from gnulib
From: |
Simon Josefsson |
Subject: |
Re: Alignment issue with sha1 code from gnulib |
Date: |
Thu, 31 Jan 2008 11:13:49 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> Bruno Haible <address@hidden> wrote:
>
>> Jim Meyering wrote:
>>> Thanks for the suggestion. It looks like a good one.
>>
>> The suggestion also applies to the 'md5' module, after which the 'sha1'
>> module
>> is modeled.
>
> Yep. md2 and md4 too.
> For now, I've pushed the sha1 changes.
I applied this patch.
/Simon
2008-01-31 Simon Josefsson <address@hidden>
* lib/sha1.c (set_uint32): Mark function as static.
diff --git a/lib/sha1.c b/lib/sha1.c
index d9e99d8..22172a9 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -1,7 +1,7 @@
/* sha1.c - Functions to compute SHA1 message digest of files or
memory blocks according to the NIST specification FIPS-180-1.
- Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006 Free Software
+ Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2008 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
@@ -70,7 +70,7 @@ sha1_init_ctx (struct sha1_ctx *ctx)
/* Copy the 4 byte value from v into the memory location pointed to by *cp,
If your architecture allows unaligned access this is equivalent to
* (uint32_t *) cp = v */
-void
+static void
set_uint32 (char *cp, uint32_t v)
{
memcpy (cp, &v, 4);
- Alignment issue with sha1 code from gnulib, David Shaw, 2008/01/29
- Re: Alignment issue with sha1 code from gnulib, Jim Meyering, 2008/01/30
- Re: Alignment issue with sha1 code from gnulib, Jim Meyering, 2008/01/30
- Re: Alignment issue with sha1 code from gnulib, Bruno Haible, 2008/01/30
- Re: Alignment issue with sha1 code from gnulib, Jim Meyering, 2008/01/31
- Re: Alignment issue with sha1 code from gnulib, Simon Josefsson, 2008/01/31
- Re: Alignment issue with sha1 code from gnulib, Bruno Haible, 2008/01/31
- Re: Alignment issue with sha1 code from gnulib, Jim Meyering, 2008/01/31
- Re: Alignment issue with sha1 code from gnulib, Simon Josefsson, 2008/01/31
- Re: Alignment issue with sha1 code from gnulib,
Simon Josefsson <=
- Re: Alignment issue with sha1 code from gnulib, Simon Josefsson, 2008/01/31
Re: Alignment issue with sha1 code from gnulib, Jim Meyering, 2008/01/31