Skip to content

Crashing on bad read #63

@arandomdev

Description

@arandomdev

Sometimes when nfc.read() and it fails to read the NDEF records the arduino crashes.

Stacktrace:
nfc.read()
MifareUltralight(uid, uidLength)
NdefMessage(buffer, messageLength()CRASH!

I think the issue is when the messageLength is set to 0, so fix this I suggest that we change the comparison operator in NdefMessage.cpp from:

`
...

while (index <= numBytes)

...`

to
`...

while (index < numBytes)

...`

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