Skip to content

Commit

Permalink
fix issue with compressed pointer (issue 4648) (#4752)
Browse files Browse the repository at this point in the history
  • Loading branch information
bikemike authored and devyte committed Jun 7, 2018
1 parent 73d36bb commit ea4720b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/ESP8266mDNS/ESP8266mDNS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,8 @@ void MDNSResponder::_parsePacket(){
if (tmp8 & 0xC0) { // Compressed pointer
uint16_t offset = ((((uint16_t)tmp8) & ~0xC0) << 8) | _conn_read8();
if (_conn->isValidOffset(offset)) {
last_bufferpos = _conn->tell();
if (0 == last_bufferpos)
last_bufferpos = _conn->tell();
#ifdef DEBUG_ESP_MDNS_RX
DEBUG_ESP_PORT.print("Compressed pointer, jumping from ");
DEBUG_ESP_PORT.print(last_bufferpos);
Expand Down

0 comments on commit ea4720b

Please sign in to comment.