When --delete is enabled, both send_files() and send_chunks_multithreaded() send the manifest by calling send_status(), send_int(), and send_str() but do not check their return values. If the connection fails mid-manifest, the sender continues and then sends STATUS_FINISHED, desynchronizing the protocol and potentially leaving the receiver in a bad state.
Check every send_status()/send_int()/send_str() return in the manifest block.
If any send fails, disconnect and return an error.
Extract the manifest-send block into a helper that returns bool.
Severity
Medium
Category
bug
This issue was automatically generated by the issue-creator agent.
## Description
When `--delete` is enabled, both `send_files()` and `send_chunks_multithreaded()` send the manifest by calling `send_status()`, `send_int()`, and `send_str()` but do not check their return values. If the connection fails mid-manifest, the sender continues and then sends `STATUS_FINISHED`, desynchronizing the protocol and potentially leaving the receiver in a bad state.
## Location
- `src/client/client_send.c:221-225` (multithreaded sender)
- `src/client/client_send.c:408-412` (single-threaded sender)
## Suggested fix
1. Check every `send_status()`/`send_int()`/`send_str()` return in the manifest block.
2. If any send fails, disconnect and return an error.
3. Extract the manifest-send block into a helper that returns `bool`.
## Severity
Medium
## Category
bug
---
_This issue was automatically generated by the issue-creator agent._
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.
Description
When
--deleteis enabled, bothsend_files()andsend_chunks_multithreaded()send the manifest by callingsend_status(),send_int(), andsend_str()but do not check their return values. If the connection fails mid-manifest, the sender continues and then sendsSTATUS_FINISHED, desynchronizing the protocol and potentially leaving the receiver in a bad state.Location
src/client/client_send.c:221-225(multithreaded sender)src/client/client_send.c:408-412(single-threaded sender)Suggested fix
send_status()/send_int()/send_str()return in the manifest block.bool.Severity
Medium
Category
bug
This issue was automatically generated by the issue-creator agent.