timmerk / libfreefare

Automatically exported from code.google.com/p/libfreefare
Other
0 stars 0 forks source link

mifare_application_free() doesn't perform a NULL pointer check. #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the source for mifare_application_free(), a call to 
mifare_application_find() is done. This call could return NULL if malloc() 
fails, but mifare_application_free() doesn't check for this condition.

I suggest applying the attached patch.

Original issue reported on code.google.com by fuz...@gmail.com on 19 Mar 2014 at 4:09

Attachments:

GoogleCodeExporter commented 9 years ago
Altered patch to match stylistic conventions of the libfreefare.

PS: Please have a look at the Go bindings I am writing for the libfreefare at 
http://github.com/fuzxxl/freefare

Original comment by fuz...@gmail.com on 19 Mar 2014 at 4:14

Attachments:

GoogleCodeExporter commented 9 years ago
This patch filters another instance where error handling is invalid. It can be 
applied atop the previous patch.

Original comment by fuz...@gmail.com on 19 Mar 2014 at 5:28

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks this is pushed now.
I added a link to your Go bindings lib on 
http://nfc-tools.org/index.php?title=Related_links

Original comment by yob...@gmail.com on 19 Mar 2014 at 6:07

GoogleCodeExporter commented 9 years ago
Thank you for this free advertisement. Perhaps you could also add a link to my 
libnfc bindings?

http://github.com/fuzxxl/nfc

I've started to write patches for the other issues, should be ready soon.

Original comment by fuz...@gmail.com on 19 Mar 2014 at 8:11

GoogleCodeExporter commented 9 years ago
Done.
I took the freedom to call them fuzxxl-libnfc and fuzxxl-libfreefare.

Original comment by yob...@gmail.com on 19 Mar 2014 at 8:27