]> Kevux Git Server - fll/commitdiff
Security: Invalid va_arg() call resulting in overflow.
authorKevin Day <thekevinday@gmail.com>
Sat, 26 Feb 2022 17:20:01 +0000 (11:20 -0600)
committerKevin Day <thekevinday@gmail.com>
Sat, 26 Feb 2022 17:20:01 +0000 (11:20 -0600)
This overflow doesn't seem to cause crashes, which is even scarier as has gotten away with unnoticed.

The else condition inside of the formatted print functions are accidentally declaring va_arg() when it shouldn't.
The except_at and except_in are also being unnecessarily declared.

level_1/fl_print/c/private-print.c

index e98cc4e9c16bc8232791c1469897c1657b17e0e5..373145f9576a81280a2458b12aeee305f6988c48 100644 (file)
@@ -370,9 +370,6 @@ extern "C" {
                   }
                 }
                 else {
-                  const f_array_lengths_t except_at = f_array_lengths_t_initialize;
-                  const f_string_ranges_t except_in = f_string_ranges_t_initialize;
-
                   if (partial.start > partial.stop) {
                     *status = F_data_not;
 
@@ -768,9 +765,6 @@ extern "C" {
                   }
                 }
                 else {
-                  const f_array_lengths_t except_at = f_array_lengths_t_initialize;
-                  const f_string_ranges_t except_in = va_arg(apl, f_string_ranges_t);
-
                   if (partial.start > partial.stop) {
                     *status = F_data_not;