]> 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:21:27 +0000 (15:21 -0600)
level_1/fl_conversion/c/private-conversion.c

index 7148c703932b20fe290e2c5a48898231450a661d..0cb22ae7d2013e5902c1dd2eb3daadee5ab1804e 100644 (file)
@@ -151,6 +151,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_number_unsigned_t i = 0; i < length; ++i) {
 
@@ -245,6 +248,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_number_unsigned_t i = 0; i < length; ++i) {