mirror of
https://github.com/bitdefender/bddisasm.git
synced 2025-05-31 05:38:46 +00:00
Fixed potential unaligned load, as reported by UBSAN.
This commit is contained in:
parent
63ca9e4328
commit
91f04ed43b
@ -5,6 +5,12 @@ All notable (user-facing) changes to this project will be documented in this fil
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
|
|
||||||
|
## [2.1.5] - 2024-05-28
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Potential unaligned load, as reported by UBSAN.
|
||||||
|
|
||||||
|
|
||||||
## [2.1.4] - 2024-03-27
|
## [2.1.4] - 2024-03-27
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -12,7 +12,7 @@ from setuptools import find_packages, setup, Command, Extension, Distribution
|
|||||||
from codecs import open
|
from codecs import open
|
||||||
|
|
||||||
VERSION = (0, 3, 0)
|
VERSION = (0, 3, 0)
|
||||||
LIBRARY_VERSION = (2, 1, 4)
|
LIBRARY_VERSION = (2, 1, 5)
|
||||||
DIR_INCLUDE = '../../inc'
|
DIR_INCLUDE = '../../inc'
|
||||||
|
|
||||||
here = os.path.abspath(os.path.dirname(__file__))
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#define DISASM_VERSION_MAJOR 2
|
#define DISASM_VERSION_MAJOR 2
|
||||||
#define DISASM_VERSION_MINOR 1
|
#define DISASM_VERSION_MINOR 1
|
||||||
#define DISASM_VERSION_REVISION 4
|
#define DISASM_VERSION_REVISION 5
|
||||||
|
|
||||||
#define SHEMU_VERSION_MAJOR DISASM_VERSION_MAJOR
|
#define SHEMU_VERSION_MAJOR DISASM_VERSION_MAJOR
|
||||||
#define SHEMU_VERSION_MINOR DISASM_VERSION_MINOR
|
#define SHEMU_VERSION_MINOR DISASM_VERSION_MINOR
|
||||||
|
@ -373,17 +373,11 @@ typedef ND_UINT32 ND_REG_SIZE;
|
|||||||
// Sets the sign of the sz bytes long value x.
|
// Sets the sign of the sz bytes long value x.
|
||||||
#define ND_SET_SIGN(sz, x) ND_SIGN_EX(sz, x)
|
#define ND_SET_SIGN(sz, x) ND_SIGN_EX(sz, x)
|
||||||
|
|
||||||
#ifdef BIG_ENDIAN
|
#define ND_FETCH_64(b) (((ND_UINT64)ND_FETCH_32((ND_UINT8 *)b)) | (((ND_UINT64)ND_FETCH_32((ND_UINT8 *)b + 4) << 32)))
|
||||||
#define ND_FETCH_64(b) ((ND_UINT64)ND_FETCH_32((char *)b) | ((ND_UINT64)ND_FETCH_32((char *)b + 4) << 32))
|
#define ND_FETCH_32(b) (((ND_UINT32)ND_FETCH_16((ND_UINT8 *)b)) | (((ND_UINT32)ND_FETCH_16((ND_UINT8 *)b + 2) << 16)))
|
||||||
#define ND_FETCH_32(b) ((ND_UINT32)ND_FETCH_16((char *)b) | ((ND_UINT32)ND_FETCH_16((char *)b + 2) << 16))
|
#define ND_FETCH_16(b) (((ND_UINT16)ND_FETCH_8 ((ND_UINT8 *)b)) | (((ND_UINT16)ND_FETCH_8 ((ND_UINT8 *)b + 1) << 8)))
|
||||||
#define ND_FETCH_16(b) ((((char *)b)[0]) | (((char *)b)[1] << 8))
|
#define ND_FETCH_8(b) (*((ND_UINT8 *)b))
|
||||||
#define ND_FETCH_8(b) (*((char *)b))
|
|
||||||
#else
|
|
||||||
#define ND_FETCH_64(b) (*((ND_UINT64 *)(b)))
|
|
||||||
#define ND_FETCH_32(b) (*((ND_UINT32 *)(b)))
|
|
||||||
#define ND_FETCH_16(b) (*((ND_UINT16 *)(b)))
|
|
||||||
#define ND_FETCH_8(b) (*((ND_UINT8 *)(b)))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user