aid->uint16 = bt_get_be16(p);
pElem = (char *) aid;
} else {
+ uint16_t tmp;
+
+ memcpy(&tmp, p, sizeof(tmp));
+
pElem = malloc(sizeof(uint16_t));
- bt_put_be16(bt_get_unaligned((uint16_t *)p), pElem);
+ bt_put_be16(tmp, pElem);
}
p += sizeof(uint16_t);
seqlen += sizeof(uint16_t);
pElem = (char *) aid;
} else {
+ uint32_t tmp;
+
+ memcpy(&tmp, p, sizeof(tmp));
+
pElem = malloc(sizeof(uint32_t));
- bt_put_be32(bt_get_unaligned((uint32_t *)p), pElem);
+ bt_put_be32(tmp, pElem);
}
p += sizeof(uint32_t);
seqlen += sizeof(uint32_t);