Fix more argc checks

Signed-off-by: Aditya Deshpande <[email protected]>
This commit is contained in:
Aditya Deshpande
2023-02-05 15:47:45 +00:00
parent e87ed421be
commit 56d90038fd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ int main(int argc, char *argv[])
mbedtls_md_init(&md_ctx);
if (argc == 1) {
if (argc < 2) {
const int *list;
mbedtls_printf("print mode: generic_sum <mbedtls_md> <file> <file> ...\n");
+1 -1
View File
@@ -38,7 +38,7 @@
int main(int argc, char *argv[])
{
if (argc != 2) {
if (argc < 2 || strcmp(argv[1], "-h") == 0) {
mbedtls_printf(USAGE, argv[0]);
return MBEDTLS_EXIT_FAILURE;
}