Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with SCardStatus on MAC OS X 10.10 (Yosemite) #137

Open
macosforgebot opened this issue Nov 27, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@macosforgebot
Copy link

commented Nov 27, 2014

sourin-v@… originally submitted this as ticket:140

  • Keywords: Yosemite, SCardStatus
  • Cc: sourin-v@…

ScardStatus? calls return bad length for reader (first call with NULL buffer) and then failed with SCARD_E_INSUFFICIENT_BUFFER (0x80100008)

Steps to Reproduce:

  1. Install Xcode 6.1
  2. Create a new Command-Line Project
  3. Link PCSC Framework to Project
  4. Add main.c into Project
  5. Plug an USB smartcard reader and insert a smartcard
  6. Compile & Run project

Expected Results:
Program should print information about the card

Actual Results:
When allocating a buffer of size specified by the first SCardStatus call, the second call to SCardStatus failed with SCARD_E_INSUFFICIENT_BUFFER (0x80100008)

@macosforgebot

This comment has been minimized.

Copy link
Author

commented Nov 27, 2014

sourin-v@… originally submitted this as attachment:main.c:⁠ticket:140

  • Attachment main.c (5.1 KB) added
@macosforgebot

This comment has been minimized.

Copy link
Author

commented Dec 9, 2014

harningt@… originally submitted this as comment:1:⁠ticket:140


Item of note: if you allocate slightly larger (I think even 1 byte larger was enough) it will work.

This is indeed a bug that should be solved as the formula should be 'ask for buffer size, allocate buffer size, fill buffer' not 'ask, guess, allocate, fill'

@macosforgebot

This comment has been minimized.

Copy link
Author

commented Dec 20, 2014

sourin-v@… originally submitted this as comment:2:⁠ticket:140

  • Cc sourin-v@… added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.