projects
/
platform
/
upstream
/
neard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d33b78
)
mifare: Fix possible NULL pointer dereference in reading loop
author
Dorota Moskal
<dorota.moskal@tieto.com>
Thu, 27 Sep 2012 11:22:12 +0000
(13:22 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Tue, 9 Oct 2012 18:27:11 +0000
(20:27 +0200)
After reading first sector, reading loop should check if sector list
is NULL in case only one valid NFC sector is present.
plugins/mifare.c
patch
|
blob
|
history
diff --git
a/plugins/mifare.c
b/plugins/mifare.c
index
0af07da
..
03e5921
100644
(file)
--- a/
plugins/mifare.c
+++ b/
plugins/mifare.c
@@
-418,7
+418,7
@@
static int mifare_read_NFC_loop(uint8_t *resp, int length, void *data)
/* Additional sectors to read ? */;
- if (mf_ck->g_sect_list->next != NULL) {
+ if (mf_ck->g_sect_list
!= NULL && mf_ck->g_sect_list
->next != NULL) {
err = mifare_read_sector(data, /* cookie */
mf_ck->nfc_data, /* where to store */