Commit c0181bd
Reject non-None values when encoding with explicit ValueType.NULL
encode_value() with an explicit ValueType.NULL silently discarded non-None
values, returning 8 zero bytes. Since value=None is already caught at the top
of the function, reaching the NULL branch with a non-None value is always a
caller bug. Now raises EncodeError instead of silently losing data.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent f5dda2a commit c0181bd
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
219 | 224 | | |
220 | 225 | | |
221 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
0 commit comments