Need to explicitly check that the SQL query returns a match before
returning values.
Signed-hostap: Jouni Malinen <j@w1.fi>
u8 opc[16];
u8 amf[2];
u8 sqn[6];
+ int set;
};
static struct milenage_parameters *milenage_db = NULL;
struct milenage_parameters *m = ctx;
int i;
+ m->set = 1;
+
for (i = 0; i < argc; i++) {
if (os_strcmp(col[i], "ki") == 0 && argv[i] &&
hexstr2bin(argv[i], m->ki, sizeof(m->ki))) {
NULL) != SQLITE_OK)
return NULL;
+ if (!db_tmp_milenage.set)
+ return NULL;
return &db_tmp_milenage;
}