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

pb.decode() 导致 out of memory #251

Closed
wilsonloo opened this issue Sep 12, 2023 · 1 comment
Closed

pb.decode() 导致 out of memory #251

wilsonloo opened this issue Sep 12, 2023 · 1 comment
Labels

Comments

@wilsonloo
Copy link

使用 commit 为 441d662c01080ce7af3c2beef53d524e5b408635 以上的代码:

local pb = require "pb" -- pb.so

local raw_data = -- 原始二进制数据
local proto = ""
local ret = pb.decode(proto, raw_data) -- 这里会产生 assert:out of memory stack traceback:

原因是 proto 是长度为0的空字符串(不是nil),建议添加对proto这个参数的检测描述,我还已读以为是否我传递的raw_data 有问题。

@starwing starwing added the bug label Sep 12, 2023
@starwing
Copy link
Owner

fixed on HEAD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants