From: Kevin Day Date: Sat, 24 Feb 2024 21:17:46 +0000 (-0600) Subject: Security: Conversion is not handling NULL case when base unit is an unsupported type. X-Git-Tag: 0.6.9~9 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=e83fec57895450e499f88e7bd508db766d393def;p=fll Security: Conversion is not handling NULL case when base unit is an unsupported type. --- diff --git a/level_1/fl_conversion/c/private-conversion.c b/level_1/fl_conversion/c/private-conversion.c index 30aa464..c0d3404 100644 --- a/level_1/fl_conversion/c/private-conversion.c +++ b/level_1/fl_conversion/c/private-conversion.c @@ -161,6 +161,9 @@ extern "C" { else if (data.base == 8) { character_to_digit = f_conversion_character_to_octal; } + else { + return F_status_set_error(F_parameter); + } for (f_array_length_t i = 0; i < length; ++i) { @@ -257,6 +260,9 @@ extern "C" { else if (data.base == 8) { character_to_digit = f_conversion_character_to_octal; } + else { + return F_status_set_error(F_parameter); + } for (f_array_length_t i = 0; i < length; ++i) {