Skip to content

Fix StringOp overflow and add Flask web interface for Tesseract OCR#4527

Open
sking85522 wants to merge 3 commits intotesseract-ocr:mainfrom
sking85522:fix-stringop-add-flask-web-ui-35033955581890584
Open

Fix StringOp overflow and add Flask web interface for Tesseract OCR#4527
sking85522 wants to merge 3 commits intotesseract-ocr:mainfrom
sking85522:fix-stringop-add-flask-web-ui-35033955581890584

Conversation

@sking85522
Copy link
Copy Markdown

This commit resolves a -Wstringop-overflow compiler warning in src/ccutil/helpers.h by refactoring ReverseN to use a safe switch statement instead of a dynamically bounded loop.

Additionally, it introduces a Python Flask web interface in app.py that allows users to upload images for text extraction. It includes an "Experimental Handwriting" mode using image preprocessing and custom Tesseract PSM/OEM configurations.

The project is configured for deployment on Render using a Dockerfile.

This commit resolves a `-Wstringop-overflow` compiler warning in
`src/ccutil/helpers.h` by refactoring `ReverseN` to use a safe `switch`
statement instead of a dynamically bounded loop.

Additionally, it introduces a Python Flask web interface in `app.py`
that allows users to upload images for text extraction. It includes
an "Experimental Handwriting" mode using image preprocessing and custom
Tesseract PSM/OEM configurations.

The project is configured for deployment on Render using a Dockerfile.

Co-authored-by: sking85522 <201207653+sking85522@users.noreply.github.com>
@sking85522
Copy link
Copy Markdown
Author

dafs

@zdenop
Copy link
Copy Markdown
Contributor

zdenop commented Mar 16, 2026

  1. This pull request currently mixes two unrelated topics, so it cannot be accepted in its current form.
  2. For the stringop-overflow issue, please provide clear, reproducible steps (including compiler version and options) so we can reproduce and investigate the problem.
  3. Regarding the web interface - please create and maintain it as a separate, external project rather than adding it to this repository.

google-labs-jules Bot and others added 2 commits March 16, 2026 20:55
This commit resolves a `-Wstringop-overflow` compiler warning in
`src/ccutil/helpers.h` by refactoring `ReverseN` to use a safe `switch`
statement instead of a dynamically bounded loop.

Additionally, it introduces a Python Flask web interface in `app.py`
that allows users to upload images for text extraction. It includes
an "Experimental Handwriting" mode using image preprocessing and custom
Tesseract PSM/OEM configurations.

The project is configured for deployment on Render using a Dockerfile
to ensure the Tesseract C++ engine can be built and accessed via the
Flask app. The original C++ source files are preserved.

Co-authored-by: sking85522 <201207653+sking85522@users.noreply.github.com>
This commit resolves a `-Wstringop-overflow` compiler warning in
`src/ccutil/helpers.h` by refactoring `ReverseN` to use a safe `switch`
statement instead of a dynamically bounded loop.

Additionally, it introduces a Python Flask web interface in `app.py`
that allows users to upload images for text extraction. It includes
an "Experimental Handwriting" mode using image preprocessing and custom
Tesseract PSM/OEM configurations.

The project is configured for deployment on Render using a Dockerfile
to ensure the Tesseract C++ engine can be built and accessed via the
Flask app. The original C++ source files are preserved.

Co-authored-by: sking85522 <201207653+sking85522@users.noreply.github.com>
@amitdo
Copy link
Copy Markdown
Collaborator

amitdo commented Mar 24, 2026

@copilot,

Please make a new PR based on the current PR (#4527). The new PR should contain just the part of the base PR that fix the string overflow and omit the web interface part.

@amitdo
Copy link
Copy Markdown
Collaborator

amitdo commented Mar 25, 2026

@stweil,

Why my call to copilot didn't activate it?

@stweil
Copy link
Copy Markdown
Member

stweil commented Mar 25, 2026

You should have got a warning symbol with the text "Copilot isn't available for cross-repository pull requests". Copilot does not accept PR requests from existing PRs which were mady by someone else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants