mirror of
https://github.com/LedgerHQ/openpgp-card-app
synced 2024-11-09 07:10:30 +00:00
Add few buffer checks
This commit is contained in:
parent
43da863428
commit
7b7bd27fa3
@ -321,12 +321,15 @@ int gpg_apdu_pso() {
|
||||
}
|
||||
key = &G_gpg_vstate.mse_dec->priv_key.ecfp;
|
||||
gpg_io_fetch_l(&l);
|
||||
gpg_io_fetch_tl(&t, &l);
|
||||
if (t != 0x7f49) {
|
||||
if (l != 37) {
|
||||
return SW_WRONG_DATA;
|
||||
}
|
||||
gpg_io_fetch_tl(&t, &l);
|
||||
if (t != 0x86) {
|
||||
if ((t != 0x7f49) || (l != 34)) {
|
||||
return SW_WRONG_DATA;
|
||||
}
|
||||
gpg_io_fetch_tl(&t, &l);
|
||||
if ((t != 0x86) || (l != 32)) {
|
||||
return SW_WRONG_DATA;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user