- sm.c: added test for available memory
- npa.c: removed obsolete comments git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@421 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -528,7 +528,7 @@ static int sm_decrypt(const struct sm_ctx *ctx, sc_card_t *card,
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (apdu->resplen < r) {
|
||||
if (apdu->resplen < r || (r && !apdu->resp)) {
|
||||
sc_debug(card->ctx, SC_LOG_DEBUG_VERBOSE, "Response of SM APDU too long");
|
||||
r = SC_ERROR_OUT_OF_MEMORY;
|
||||
goto err;
|
||||
|
||||
Reference in New Issue
Block a user