fixed out of bounds read
This commit is contained in:
parent
7c497b324f
commit
027e4a0867
|
@ -840,7 +840,7 @@ int sc_set_card_driver(sc_context_t *ctx, const char *short_name)
|
||||||
if (short_name == NULL) {
|
if (short_name == NULL) {
|
||||||
ctx->forced_driver = NULL;
|
ctx->forced_driver = NULL;
|
||||||
match = 1;
|
match = 1;
|
||||||
} else while (ctx->card_drivers[i] != NULL && i < SC_MAX_CARD_DRIVERS) {
|
} else while (i < SC_MAX_CARD_DRIVERS && ctx->card_drivers[i] != NULL) {
|
||||||
struct sc_card_driver *drv = ctx->card_drivers[i];
|
struct sc_card_driver *drv = ctx->card_drivers[i];
|
||||||
|
|
||||||
if (strcmp(short_name, drv->short_name) == 0) {
|
if (strcmp(short_name, drv->short_name) == 0) {
|
||||||
|
|
|
@ -768,7 +768,7 @@ static unsigned long part10_detect_pace_capabilities(sc_reader_t *reader)
|
||||||
PACE_FUNCTION_GetReaderPACECapabilities, /* idxFunction */
|
PACE_FUNCTION_GetReaderPACECapabilities, /* idxFunction */
|
||||||
0, 0, /* lengthInputData */
|
0, 0, /* lengthInputData */
|
||||||
};
|
};
|
||||||
u8 rbuf[6];
|
u8 rbuf[7];
|
||||||
u8 *p = rbuf;
|
u8 *p = rbuf;
|
||||||
size_t rcount = sizeof rbuf;
|
size_t rcount = sizeof rbuf;
|
||||||
struct pcsc_private_data *priv;
|
struct pcsc_private_data *priv;
|
||||||
|
|
Loading…
Reference in New Issue