Skip to content

Guard negotiation buffer growth against underflow - #222

Merged
oferchen merged 1 commit into
masterfrom
ensure-protocol-fidelity-with-rsync-3.4.1
Oct 16, 2025
Merged

oferchen merged 1 commit into
masterfrom
ensure-protocol-fidelity-with-rsync-3.4.1

Conversation

@oferchen

@oferchen oferchen commented Oct 16, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • harden NegotiationPrologueSniffer::take_buffered_into against underflow when reusing buffers by using saturating_sub
  • document the defensive behaviour in the reservation comment

Testing

  • cargo test

@oferchen
oferchen merged commit 732baaf into master Oct 16, 2025
@oferchen
oferchen deleted the ensure-protocol-fidelity-with-rsync-3.4.1 branch October 16, 2025 13:58
oferchen added a commit that referenced this pull request Jul 17, 2026
#217 CVS `.cvsignore`/$CVSIGNORE `!` handling: mirror upstream
parse_rule_tok (exclude.c:1122-1124, 1315-1323). In a NO_PREFIXES CVS
list a leading `!` tentatively sets FILTRULE_CLEAR_LIST, but len>1 clears
it, so `!foo` is a LITERAL exclude of a file named `!foo` (not a removal
of a prior `foo` exclude). A bare `!` (len==1) keeps CLEAR_LIST and
pop_filter_list (exclude.c:1399) wipes the WHOLE shared cvs list,
including the built-in defaults. Drop the invented remove-pattern path
and parse ~/.cvsignore and $CVSIGNORE into the shared accumulator.

#218 --from0/eol_nulls for filter files: honor `--from0`/`-0` when
reading `--exclude-from`/`--include-from` files so records split on NUL,
mirroring parse_filter_file (exclude.c:1501). Embedded newlines become
literal pattern bytes.

Deferred (fix site outside crates/cli, occupied by other in-flight PRs):
#219 CVS :C/-C wire placement and proto>=29 gate live in the wire
send/recv path (core build_wire_format_rules). #222 delete-excluded
no-prefixes dir-merge elision lives in core
apply_implicit_sender_side_for_delete_excluded / build_wire_format_rules.
oferchen added a commit that referenced this pull request Aug 24, 2026
#217 CVS `.cvsignore`/$CVSIGNORE `!` handling: mirror upstream
parse_rule_tok (exclude.c:1122-1124, 1315-1323). In a NO_PREFIXES CVS
list a leading `!` tentatively sets FILTRULE_CLEAR_LIST, but len>1 clears
it, so `!foo` is a LITERAL exclude of a file named `!foo` (not a removal
of a prior `foo` exclude). A bare `!` (len==1) keeps CLEAR_LIST and
pop_filter_list (exclude.c:1399) wipes the WHOLE shared cvs list,
including the built-in defaults. Drop the invented remove-pattern path
and parse ~/.cvsignore and $CVSIGNORE into the shared accumulator.

#218 --from0/eol_nulls for filter files: honor `--from0`/`-0` when
reading `--exclude-from`/`--include-from` files so records split on NUL,
mirroring parse_filter_file (exclude.c:1501). Embedded newlines become
literal pattern bytes.

Deferred (fix site outside crates/cli, occupied by other in-flight PRs):
#219 CVS :C/-C wire placement and proto>=29 gate live in the wire
send/recv path (core build_wire_format_rules). #222 delete-excluded
no-prefixes dir-merge elision lives in core
apply_implicit_sender_side_for_delete_excluded / build_wire_format_rules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant