throw an error if the APDU is too big
This commit is contained in:
@@ -137,7 +137,7 @@ ssize_t sendToVICC(struct vicc_ctx *ctx, size_t length, const unsigned char* buf
|
|||||||
ssize_t r;
|
ssize_t r;
|
||||||
uint16_t size;
|
uint16_t size;
|
||||||
|
|
||||||
if (!ctx) {
|
if (!ctx || length > 0xFFFF) {
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user