diff options
| author | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
|---|---|---|
| committer | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
| commit | ecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch) | |
| tree | b89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/python-fchksum/files | |
| parent | 1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff) | |
| download | baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip | |
Updating liguros repo
Diffstat (limited to 'dev-python/python-fchksum/files')
| -rw-r--r-- | dev-python/python-fchksum/files/python-fchksum-1.7.1-md5-align.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/dev-python/python-fchksum/files/python-fchksum-1.7.1-md5-align.patch b/dev-python/python-fchksum/files/python-fchksum-1.7.1-md5-align.patch new file mode 100644 index 000000000000..1adfa627fdd8 --- /dev/null +++ b/dev-python/python-fchksum/files/python-fchksum-1.7.1-md5-align.patch @@ -0,0 +1,26 @@ +the alignment of resbuf is not guaranteed, so use memcpy to move +the bytes in/out. on arches which can do unaligned accesses, this +will generate the same code. + +patch by Mike Frysinger + +--- a/md5.c ++++ b/md5.c +@@ -74,10 +74,13 @@ md5_read_ctx (ctx, resbuf) + const struct md5_ctx *ctx; + void *resbuf; + { +- ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A); +- ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B); +- ((md5_uint32 *) resbuf)[2] = SWAP (ctx->C); +- ((md5_uint32 *) resbuf)[3] = SWAP (ctx->D); ++ md5_uint32 swap; ++#define set(i, c) { swap = SWAP (ctx->c); memcpy (resbuf + (i * 4), &swap, 4); } ++ set (0, A); ++ set (1, B); ++ set (2, C); ++ set (3, D); ++#undef set + + return resbuf; + } |
