Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue with compressed pointer (issue 4648) #4752

Merged
merged 4 commits into from
Jun 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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