1 2 3 4 5 6 7 8 9 10 11 12 13
|
Description: Avoid unaligned integer access on big endian
Author: Michele Martone <michelemartone@users.sourceforge.net>
Bug-Debian: https://bugs.debian.org/1120344
Last-Update: 2025-11-16
--- fim-0.7.0.orig/src/fim_interpreter.cpp
+++ fim-0.7.0/src/fim_interpreter.cpp
@@ -497,3 +497,4 @@
if( *reinterpret_cast<int*>(s+0) == 0x72616e64 // rand
- && (*reinterpret_cast<int*>(s+3))== 0x646f6d00 ) // dom. // access legal bytes
+ // && (*reinterpret_cast<int*>(s+3))== 0x646f6d00 ) // dom. // access legal bytes
+ && s[4]=='o' && s[5]=='m' && !s[6]) // om. // access legal bytes avoiding unaligned int access
//&& (*reinterpret_cast<int*>(s+4)<<8)== 0x006f6d00 ) // .om. // eight byte illegal
|