Don't crash when backend cannot be signalled.

Update master sites.

PR:		ports/180291
Submitted by:	Marcin Cieslak <saper@saper.info>
This commit is contained in:
ale
2013-07-05 13:21:07 +00:00
parent ce0ea3d908
commit 68df37980e
2 changed files with 18 additions and 2 deletions
+3 -2
View File
@@ -3,9 +3,10 @@
PORTNAME= openct
PORTVERSION= 0.6.20
PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.opensc-project.org/files/${PORTNAME}/ \
http://www.opensc-project.org/files/${PORTNAME}/testing/
MASTER_SITES= SF
MASTER_SITE_SUBDIR= opensc/${PORTNAME}
MAINTAINER= ale@FreeBSD.org
COMMENT= Middleware framework for smart card terminals
+15
View File
@@ -0,0 +1,15 @@
--- src/ctapi/ctapi.c 2006-04-25 23:58:06.000000000 +0200
+++ src/ctapi/ctapi.c 2013-07-05 10:08:41.000000000 +0200
@@ -562,7 +562,11 @@
ct->next = cardTerminals;
cardTerminals = ct;
ct->cwd = &ct->mf;
- ct_reader_info(pn, &info);
+ if (ct_reader_info(pn, &info) < 0) {
+ free(ct);
+ ct_error("ct_reader_info failed\n");
+ return ERR_INVALID;
+ }
ct->mf.id = 0x3f00;
ct->mf.gen = dir;
ct->mf.dir[0] = &ct->mf;