Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有 2处会导致 coredump 的内存 bug #20

Open
byronhe opened this issue Nov 27, 2020 · 0 comments
Open

有 2处会导致 coredump 的内存 bug #20

byronhe opened this issue Nov 27, 2020 · 0 comments

Comments

@byronhe
Copy link

byronhe commented Nov 27, 2020

rapidjson::Value* pb2jsonobject(const google::protobuf::Message* msg);
这个函数有 use-after-free bug。

  1. json2field 中几处判断 json->GetType() != rapidjson::kNumberType 之后就直接调用了 GetInt()/GetUint()/GetInt64()/GetUint64() ,这个判断不够严格,会直接 coredump。应该严格用 IsInt()/IsUint/IsInt65/IsUint64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant