Bug 180291 - [PATCH] security/openct: don't crash when backed cannot be signalled
Summary: [PATCH] security/openct: don't crash when backed cannot be signalled
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-05 09:40 UTC by Marcin Cieślak
Modified: 2013-07-05 14:30 UTC (History)
1 user (show)

See Also:


Attachments
openct-0.6.20.patch (759 bytes, patch)
2013-07-05 09:40 UTC, Marcin Cieślak
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Cieślak 2013-07-05 09:40:01 UTC
My pcscd could not communicate with ifd because some problems
when attaching to the ccid ifdhandler of openct (I am using
PCMCIA Omnikey 4040 card reader via cmx(4)).

It crashed when trying to initialize the handler.
A patch attached fixes the crash I got.

The original problem must have been somewhere else (wrong
permissions/stale PID number of the handler) but nevertheless
at least now we get an error message instead of the crash.

Added file(s):
- files/patch-ctapi.c

Port maintainer (ale@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
Comment 1 Edwin Groothuis freebsd_committer 2013-07-05 09:40:19 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Alex Dupre freebsd_committer 2013-07-05 14:14:31 UTC
State Changed
From-To: open->closed

Committed, thanks!
Comment 3 dfilter service freebsd_committer 2013-07-05 14:21:20 UTC
Author: ale
Date: Fri Jul  5 13:21:07 2013
New Revision: 322323
URL: http://svnweb.freebsd.org/changeset/ports/322323

Log:
  Don't crash when backend cannot be signalled.
  Update master sites.
  
  PR:		ports/180291
  Submitted by:	Marcin Cieslak <saper@saper.info>

Added:
  head/security/openct/files/patch-ctapi.c   (contents, props changed)
Modified:
  head/security/openct/Makefile

Modified: head/security/openct/Makefile
==============================================================================
--- head/security/openct/Makefile	Fri Jul  5 13:16:57 2013	(r322322)
+++ head/security/openct/Makefile	Fri Jul  5 13:21:07 2013	(r322323)
@@ -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

Added: head/security/openct/files/patch-ctapi.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/openct/files/patch-ctapi.c	Fri Jul  5 13:21:07 2013	(r322323)
@@ -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;
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"