Merge pull request #3017 from birarda/master

fix offset to attribute in STUN packet
This commit is contained in:
Stephen Birarda 2014-06-12 13:16:24 -07:00
commit 7cb8f744c2

View file

@ -281,7 +281,7 @@ void NodeList::processSTUNResponse(const QByteArray& packet) {
int byteIndex = attributeStartIndex + NUM_BYTES_STUN_ATTR_TYPE_AND_LENGTH + NUM_BYTES_FAMILY_ALIGN;
uint8_t addressFamily = 0;
memcpy(&addressFamily, packet.data(), sizeof(addressFamily));
memcpy(&addressFamily, packet.data() + byteIndex, sizeof(addressFamily));
byteIndex += sizeof(addressFamily);