Skip to content

Commit a5954f6

Browse files
Roman513rmbelousov
authored andcommitted
Fix xmlsec version comparison macro
Use 8 instead of 4 bits for all xmlsec version fields to prevent overflow starting from version number 1.2.32
1 parent 6ed9d42 commit a5954f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/platform.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
#include <windows.h>
2020
#endif /* MS_WIN32 */
2121

22-
#define XMLSEC_VERSION_HEX ((XMLSEC_VERSION_MAJOR << 8) | (XMLSEC_VERSION_MINOR << 4) | (XMLSEC_VERSION_SUBMINOR))
22+
#define XMLSEC_VERSION_HEX ((XMLSEC_VERSION_MAJOR << 16) | (XMLSEC_VERSION_MINOR << 8) | (XMLSEC_VERSION_SUBMINOR))
2323

2424
// XKMS support was removed in version 1.2.21
2525
// https://mail.gnome.org/archives/commits-list/2015-February/msg10555.html
26-
#if XMLSEC_VERSION_HEX > 0x134
26+
#if XMLSEC_VERSION_HEX > 0x10214
2727
#define XMLSEC_NO_XKMS 1
2828
#endif
2929

0 commit comments

Comments
 (0)