Commit 8d83e411 for tesseract

commit 8d83e411b65f9b53a91b8c22ad2691cd1a629cf8
Author: Stefan Weil <sw@weilnetz.de>
Date:   Sun Aug 9 13:28:33 2026 +0200

    Fix CID 1550471 (Overflowed integer argument)

    Cast the outline step count explicitly to int16_t when passing
    it to the C_OUTLINE constructor. The value is already bounded
    by kMaxOutlineLength.

    Assisted-by: OpenCode / big-pickle (opencode)
    Signed-off-by: Stefan Weil <sw@weilnetz.de>

diff --git a/src/textord/fpchop.cpp b/src/textord/fpchop.cpp
index f6bfb10d..e6e6782e 100644
--- a/src/textord/fpchop.cpp
+++ b/src/textord/fpchop.cpp
@@ -784,7 +784,7 @@ C_OUTLINE *C_OUTLINE_FRAG::close() { // join pieces
   new_steps = new DIR128[new_stepcount];
   memmove(new_steps, steps, stepcount);
   memset(new_steps + stepcount, fake_step.get_dir(), fake_count);
-  auto *result = new C_OUTLINE(start, new_steps, new_stepcount);
+  auto *result = new C_OUTLINE(start, new_steps, static_cast<int16_t>(new_stepcount));
   delete[] new_steps;
   return result;
 }