diff options
Diffstat (limited to 'rpmio/digest.c')
-rw-r--r-- | rpmio/digest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rpmio/digest.c b/rpmio/digest.c index f31987916..c3caece4a 100644 --- a/rpmio/digest.c +++ b/rpmio/digest.c @@ -407,7 +407,8 @@ rpmDigestInit(rpmDigestFlags flags) ctx->digest[ 4 ] = 0xc3d2e1f0; } - ctx->doByteReverse = (IS_BIG_ENDIAN()) ? 0 : 1; + /* md5 sums are little endian (no swap) so big endian needs the swap. */ + ctx->doByteReverse = (IS_BIG_ENDIAN()) ? 1 : 0; if (flags & RPMDIGEST_NATIVE) ctx->doByteReverse = 0; |