1
0
mirror of https://github.com/simh/simh.git synced 2026-01-26 12:02:14 +00:00

SCP: Assure that ASSURE() gets used instead of assert()

This commit is contained in:
Mark Pizzolato
2023-06-27 04:01:31 -10:00
parent 2156bf4192
commit be831daa1d
4 changed files with 15 additions and 4 deletions

View File

@@ -387,7 +387,10 @@ static void tftp_handle_rrq(Slirp *slirp, struct tftp_t *tp, int pktlen)
}
if (nb_options > 0) {
assert(nb_options <= ARRAY_SIZE(option_name));
if (nb_options > ARRAY_SIZE(option_name)) {
fprintf (stderr, "option_name array bounds: %d\n", nb_options);
abort ();
}
tftp_send_oack(spt, option_name, option_value, nb_options, tp);
return;
}