Closed Bug 1048749 Opened 10 years ago Closed 10 years ago

NFCD: Add assert when receiving NDEF from P2P

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE
2.1 S2 (15aug)

People

(Reporter: allstars.chh, Assigned: allstars.chh)

References

Details

(Whiteboard: [p=1])

Attachments

(1 file)

Junichi-san has mentioned that they found that a NDEF is received from a P2P link before the P2P link is activated, (i.e. the techList [NDEF, P2P] come before [P2P]), this is unlikely to happen so we could add an assert in this. Also reset SessionId when it comes to INT_MAX.
Attached file Pull Request (deleted) —
Attachment #8467580 - Flags: review?(dlee)
Whiteboard: [p=1]
Target Milestone: --- → 2.1 S2 (15aug)
Just a general remark: asserts are only for validating internal state; not for input data. The assert will terminate the program, which makes DOS attacks trivial. But if you build for releases, the assert will usually be removed, which is also bad because you loose your input validation.
Hi Yoshi, Could you separate the fixs ,I cannot review the case that NDEF is received before a P2P link is established unless i know how it happens.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: