Commit ff137e2
Enforce file-content alignment on FilesResponse decode
The encoder already rejects non-8-byte-aligned content because
upstream gateway.c::dumpFile asserts ``len % 8 == 0`` for every file.
The decoder was accepting any size, so a peer that emitted bytes a
real C server would never produce silently round-tripped. Mirror the
encode-side invariant on decode too. Replace the old "no padding
between files" test's deliberately misaligned example with an aligned
one — non-aligned sizes are not realistic (SQLite pages are always
multiples of 512).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a0a1cf8 commit ff137e2
2 files changed
Lines changed: 38 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
535 | 544 | | |
536 | 545 | | |
537 | 546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1082 | 1082 | | |
1083 | 1083 | | |
1084 | 1084 | | |
1085 | | - | |
1086 | | - | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
1087 | 1091 | | |
1088 | 1092 | | |
1089 | | - | |
1090 | 1093 | | |
1091 | 1094 | | |
1092 | | - | |
1093 | | - | |
| 1095 | + | |
| 1096 | + | |
1094 | 1097 | | |
1095 | | - | |
1096 | | - | |
| 1098 | + | |
| 1099 | + | |
1097 | 1100 | | |
1098 | | - | |
1099 | | - | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
1100 | 1120 | | |
1101 | 1121 | | |
1102 | 1122 | | |
| |||
0 commit comments