Skip to content

Crashes on Galileo when calling readHeader() or skipResponseHeaders() #10

@mechalas

Description

@mechalas

This library crashes on Galileo when you call skipResponseHeaders() or readHeader(). The issue is that readHeader() is doing this:

if (*iContentLengthPtr == c)

But this pointer gets initialized to 0 instead of kContentLengthPrefix in resetState(), so you are doing a check on a NULL pointer. On a true Arduino device this may not crash, but I bet it doesn't work like it's intended.

The fix is to initialize iContentLengthPtr correctly in resetState():

iContentLengthPtr= kContentLengthPrefix;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions