2.4.x field type json format bug#308
Open
CharlesTHN wants to merge 5 commits into
Open
Conversation
Go 1.13+ 的 -trimpath 参数不需要指定路径值,它会自动移除所有本地路径信息。
- event_row:按 len(data) 传入解析,与 Next() 截断行为一致 - field_type_json_format:钳制 length 至 buf 剩余、嵌套递归用 buf.Len()、元素数上限、变量长字符串与对象值解析错误处理 - 增加声明长度远大于 payload 的回归测试 Made-with: Cursor
1. 修复 read_offset_or_inline 对 INT64/UINT64/DOUBLE 的处理逻辑,这些类型在 value-entry 中存储偏移量而非内联值,修复了导致解析错位的根本原因。 2. 修复 parsePartialJSONBinlog 解析顺序,符合 MySQL 8 真实格式(op -> path_len -> path -> value_len -> value)。 3. 修复 read_binary_json_object/array 中冗余判断和死代码 fallback。 4. 为 readJSONVaruintLength 添加位宽溢出防护,防止损坏数据导致死循环或溢出。 5. 在 getPluginAndSetParam 中添加边界检查,修复潜在的空指针引用问题。 6. 更新版本号至 v2.4.5-lc。 Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复问题:
运行过程中频发事件解析的空指针错误
修复项:
1.修复了数组类型判断错误(之前数组分支错误地检查了 JSONB_TYPE_LARGE_OBJECT,已改为检查 JSONB_TYPE_LARGE_ARRAY)。
2.修复了在 large object 分支中 key offsets 的索引错误(把原来错误的 key_offset_lengths[0] = ... 改为 key_offset_lengths[i] = ...)。
3.修改了打包语句,Go 1.13+ 的 -trimpath 参数不需要指定路径值,它会自动移除所有本地路径信息。
单元测试已过,运行 一周没有再复现此异常