kaoh / globalplatform

C library + command-line for Open- / GlobalPlatform smart cards
https://kaoh.github.io/globalplatform/
Other
72 stars 30 forks source link

gpshell 1.4.2: SELECT with an extra byte will infinite loop. #9

Closed kaoh closed 4 years ago

kaoh commented 15 years ago

SELECT 3d40 with extra byte at the end (this causes an infinite loop in gpshell.exe).

send_apdu -sc 0 -APDU 00a40000023d4000

I debugged GPShell.c v1.4.0 to GP211_send_APDU() at Line 1149. It never returns.

On a separate note, Visual C++ Express 2005 is no longer supported. The project should be updated to 2008 SP1.

Reported by: rpao

kaoh commented 15 years ago

gpshell input file showing SELECT with an extra byte will cause infinite loop

Original comment by: rpao

kaoh commented 14 years ago

Only Visual C++ 2008 is supported now. And in addition Code::Blocks

Original comment by: kaoh

kaoh commented 14 years ago

The mentioned send_apdu -sc 0 -APDU 00a40000023d4000 returns send_APDU() returns 0x80206A86 (6A86: Incorrect parameters (P1, P2).)

The command returns if a command is not a valid APDU:

send_APDU() returns 0x80301000 (A APDU command can't be recognized as a valid T=0 protocol Case 1-4 ISO7816-4 APDU)

Original comment by: kaoh