]> Kevux Git Server - fll/commitdiff
Security: Conversion is not handling NULL case when base unit is an unsupported type.
authorKevin Day <kevin@kevux.org>
Sat, 24 Feb 2024 21:17:46 +0000 (15:17 -0600)
committerKevin Day <kevin@kevux.org>
Sat, 24 Feb 2024 21:20:48 +0000 (15:20 -0600)
level_1/fl_conversion/c/private-conversion.c

index 30aa464b67f460da7a017dfc4e74717743294b70..c0d3404dec2dd5314a2b7fa7754346b76f27d928 100644 (file)
@@ -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) {