1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-28 04:34:27 +01:00

Added some fixes to the build system. Fixed bugs in DNS and ICMPv6 triggered in big-endian architectures.

This commit is contained in:
Matias Fontanini
2013-01-24 23:55:01 -03:00
parent 0dc762f15d
commit 5ee0ebb264
14 changed files with 843 additions and 1454 deletions

View File

@@ -606,7 +606,9 @@ ICMPv6::addr_list_type ICMPv6::search_addr_list(Options type) const {
ICMPv6::rsa_sign_type ICMPv6::rsa_signature() const {
const icmpv6_option *opt = search_option(RSA_SIGN);
// 2 bytes reserved + at least 1 byte signature.
if(!opt || opt->data_size() < 2 + sizeof(rsa_sign_type::key_hash) + 1)
// 16 == sizeof(rsa_sign_type::key_hash), removed the sizeof
// expression since gcc 4.2 doesn't like it
if(!opt || opt->data_size() < 2 + 16 + 1)
throw option_not_found();
const uint8_t *ptr = opt->data_ptr() + 2;
rsa_sign_type output;