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:
a0e7f9c
)
nfctype2: Do not read data if CC indicates a zero length
author
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 12 May 2011 15:17:50 +0000
(17:17 +0200)
committer
Marcel Holtmann
<marcel@holtmann.org>
Fri, 21 Oct 2011 06:54:03 +0000
(23:54 -0700)
plugins/nfctype2.c
patch
|
blob
|
history
diff --git
a/plugins/nfctype2.c
b/plugins/nfctype2.c
index
d989a7a
..
4f3d476
100644
(file)
--- a/
plugins/nfctype2.c
+++ b/
plugins/nfctype2.c
@@
-164,6
+164,8
@@
static int meta_recv(uint8_t *resp, int length, void *data)
tag->data_length = TAG_DATA_LENGTH(tag->cc);
tag->data = g_try_malloc0(tag->data_length);
+ if (tag->data == NULL || tag->data_length = 0)
+ return -ENOMEM;
return data_read(tag);
}