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:
73a8575
)
nfctype4: Fix segmentation fault on invalid access key
author
Olivier Guiter
<olivier.guiter@linux.intel.com>
Mon, 17 Jun 2013 14:42:41 +0000
(16:42 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Tue, 18 Jun 2013 15:43:08 +0000
(17:43 +0200)
If length is < 0, further access to the resp buffer will cause neard to
seg fault.
plugins/nfctype4.c
patch
|
blob
|
history
diff --git
a/plugins/nfctype4.c
b/plugins/nfctype4.c
index
4798f5e
..
1f3295b
100644
(file)
--- a/
plugins/nfctype4.c
+++ b/
plugins/nfctype4.c
@@
-531,7
+531,7
@@
static int t4_select_file_by_name_v2(uint8_t *resp, int length, void *data)
DBG("%d", length);
if (length < 0)
- t4_cookie_release(length, cookie);
+
return
t4_cookie_release(length, cookie);
/* Check for APDU error - Not found */
if (APDU_STATUS(resp + STATUS_WORD_1) == APDU_NOT_FOUND) {