Package: simgear
Version: 3.2.0~git20140719+4a9125-1
Severity: serious
Control: tags -1 patch

https://buildd.debian.org/status/package.php?p=simgear&suite=experimental

Untested fix attached.
Description: Actually enable the big-endian fallback
Author: Rebecca Palmer <rebecca_pal...@zoho.com>

WORDS_BIGENDIAN isn't actually defined anywhere, causing md5.c to
default to little-endian, and fail tests if this is wrong:

https://buildd.debian.org/status/logs.php?pkg=simgear&ver=3.2.0~git20140719%2B4a9125-1&suite=experimental

Forwarded: can't be as it stands (probably breaks Windows/MSVC)

--- simgear-3.2.0~git20140719+4a9125.orig/simgear/package/md5.c
+++ simgear-3.2.0~git20140719+4a9125/simgear/package/md5.c
@@ -158,7 +158,7 @@ SG_MD5Transform(u_int32_t state[4], cons
 {
 	u_int32_t a, b, c, d, in[MD5_BLOCK_LENGTH / 4];
 
-#ifndef WORDS_BIGENDIAN
+#if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__
 	memcpy(in, block, sizeof(in));
 #else
 	for (a = 0; a < MD5_BLOCK_LENGTH / 4; a++) {
@@ -247,4 +247,4 @@ SG_MD5Transform(u_int32_t state[4], cons
 	state[1] += b;
 	state[2] += c;
 	state[3] += d;
-}
\ No newline at end of file
+}

Reply via email to