mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-04-17 19:43:50 +00:00
[PR #2034] [MERGED] Fix atol Parsing Bug in parser.rs for Numeric Values and Suffixes #2839
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/2034
Author: @THE-Amrit-mahto-05
Created: 1/18/2026
Status: ✅ Merged
Merged: 1/18/2026
Merged by: @cfsmp3
Base:
master← Head:fix/parser-atol-bug📝 Commits (2)
b2e9cb7Fix atol parsing bug for numeric values and K/M/G suffixesead0a4blittle fix📊 Changes
1 file changed (+18 additions, -11 deletions)
View changed files
📝
src/rust/src/parser.rs(+18 -11)📄 Description
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
Description
the atol function does not correctly handle numeric buffer sizes in strings.
Current behavior
Fix implemented
Example behavior after fix
"100" → 100
"1K" → 1024
"1M" → 1048576
"1G" → 1073741824
This ensures that buffer sizes in the code are parsed correctly and prevents runtime errors or incorrect calculations, following the expected behavior of the original C implementation of atol.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.