fix crash on V0.2 direction detection
@@ -399,6 +399,7 @@ ACVP_RESULT acvp_aes_kat_handler(ACVP_CTX *ctx, JSON_Object *obj)
/*
* verify the direction is valid - 0.2 version only
*/
+ if (dir_str != NULL) {
if (!strncmp(dir_str, "encrypt", 7)) {
dir = ACVP_DIR_ENCRYPT;
} else if (!strncmp(dir_str, "decrypt", 7)) {
@@ -407,7 +408,7 @@ ACVP_RESULT acvp_aes_kat_handler(ACVP_CTX *ctx, JSON_Object *obj)
acvp_log_msg(ctx, "ERROR: unsupported direction requested from server (%s)", dir_str);
//return (ACVP_UNSUPPORTED_OP);
}
-
+ }
/*
* Get a reference to the abstracted test case
*/
