AddFile accepts a size parameter but does not verify that the total bytes read from the reader actually matches the declared size. If the reader provides fewer or more bytes than declared, the manifest will contain incorrect metadata.
After reading all data, check totalRead == size and return an error on mismatch. This prevents silent data corruption in manifests.
**Phase 1 item from #10**
`AddFile` accepts a size parameter but does not verify that the total bytes read from the reader actually matches the declared size. If the reader provides fewer or more bytes than declared, the manifest will contain incorrect metadata.
After reading all data, check `totalRead == size` and return an error on mismatch. This prevents silent data corruption in manifests.
clawbot
self-assigned this 2026-02-09 01:05:41 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Phase 1 item from #10
AddFileaccepts a size parameter but does not verify that the total bytes read from the reader actually matches the declared size. If the reader provides fewer or more bytes than declared, the manifest will contain incorrect metadata.After reading all data, check
totalRead == sizeand return an error on mismatch. This prevents silent data corruption in manifests.