<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-02-17 20:24 GMT+01:00 Maximilian Stein <span dir="ltr"><<a target="_blank" href="mailto:maximilian.stein@secunet.com">maximilian.stein@secunet.com</a>></span>:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Hello,<br></blockquote><div><br></div><div>Hello,<br> <br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
<br>
I think SCardControl() should work similar to SCardTransmit() regarding<br>
client application buffer size as in commit [1]. Depending on the<br>
underlying IFD handler the current implementation might cause the same<br>
incorrect behaviour as described in [1].<br>
<br>
If the underlying IFD Handler is not correctly checking the buffer size,<br>
the current implementation could even cause a buffer overflow in the<br>
client application.<br>
<br>
The attached patch solves this similar to the fix in [1].<br>
<br>
<br>
Kind regards<br>
Maximilian Stein<br>
<br>
[1] 8eb9ea1b354b050f997d003cf3b0c5<wbr>b56f29f9f7 - SCardTransmit() may<br>
return SCARD_E_INSUFFICIENT_BUFFER<br>
<br></blockquote><br></div>You are right.<br></div><div class="gmail_extra">Patch applied in <a href="https://github.com/LudovicRousseau/PCSC/commit/09cf6c7de55f1b4ab1d8a3f86c7a56d7a8621538">https://github.com/LudovicRousseau/PCSC/commit/09cf6c7de55f1b4ab1d8a3f86c7a56d7a8621538</a><br><br></div><div class="gmail_extra">Thanks<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature"> Dr. Ludovic Rousseau</div>
</div></div>