Skip to content

fix: fix issue #47#50

Open
pedriniedoardo wants to merge 1 commit intoNygenAnalytics:masterfrom
pedriniedoardo:master
Open

fix: fix issue #47#50
pedriniedoardo wants to merge 1 commit intoNygenAnalytics:masterfrom
pedriniedoardo:master

Conversation

@pedriniedoardo
Copy link
Copy Markdown

No description provided.

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Fix integer overflow in chunk offset calculation

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Convert chunk index and size to numeric before multiplication
• Prevents integer overflow in offset calculation for large files
• Applies fix to both server and R2 upload functions
Diagram
flowchart LR
  A["chunk_idx * chunk_size"] -->|"integer overflow risk"| B["offset calculation"]
  C["as.numeric conversion"] -->|"prevents overflow"| B
  B --> D["Upload chunk functions"]
Loading

Grey Divider

File Changes

1. R/client.R 🐞 Bug fix +2/-2

Add numeric conversion to offset calculations

• Convert chunk_idx and chunk_size to numeric type before multiplication in
 .upload_chunk_server() function
• Convert chunk_idx and chunk_size to numeric type before multiplication in .upload_chunk_r2()
 function
• Prevents integer overflow when calculating file offset for large file uploads

R/client.R


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review bot commented Apr 17, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

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.

1 participant