Commit 9fbc417
net: nfc: nci: Fix parameter validation for packet data
Since commit 9c328f5 ("net: nfc: nci: Add parameter validation for
packet data") communication with nci nfc chips is not working any more.
The mentioned commit tries to fix access of uninitialized data, but
failed to understand that in some cases the data packet is of variable
length and can therefore not be compared to the maximum packet length
given by the sizeof(struct).
For these cases it is only possible to check for minimum packet length.
Fixes: 9c328f5 ("net: nfc: nci: Add parameter validation for packet data")
Cc: stable@vger.kernel.org
Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at>
Signed-off-by: NipaLocal <nipa@local>1 parent e706bd5 commit 9fbc417
1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
364 | 365 | | |
365 | 366 | | |
366 | 367 | | |
367 | | - | |
| 368 | + | |
| 369 | + | |
368 | 370 | | |
369 | 371 | | |
370 | 372 | | |
| |||
596 | 598 | | |
597 | 599 | | |
598 | 600 | | |
599 | | - | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
600 | 605 | | |
601 | 606 | | |
602 | 607 | | |
| |||
0 commit comments