mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-19 19:33:38 +08:00
Fix bound check
This commit is contained in:
@@ -383,7 +383,7 @@ int tls13_client_main(int argc, char *argv[])
|
||||
} else if (!strcmp(*argv, "-psk_dhe_ke")) {
|
||||
psk_dhe_ke = 1;
|
||||
} else if (!strcmp(*argv, "-psk_identity")) {
|
||||
if (psk_identities_cnt > sizeof(psk_identities)/sizeof(psk_identities[0])) {
|
||||
if (psk_identities_cnt >= sizeof(psk_identities)/sizeof(psk_identities[0])) {
|
||||
fprintf(stderr, "%s: too many -psk_identity options\n", prog);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user