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

when serialize , got 'zend_mm_heap corrupted' #59

Open
huasonglee opened this issue Jun 22, 2016 · 1 comment
Open

when serialize , got 'zend_mm_heap corrupted' #59

huasonglee opened this issue Jun 22, 2016 · 1 comment

Comments

@huasonglee
Copy link

huasonglee commented Jun 22, 2016

we had read the source code , found the bug:
file: serializer.c
line: 76, 101

the 2nd var is 1,

101 if (php_protocolbuffers_serializer_resize(serializer, 1)) {

but look the code bellow; it use 4 or 8

123 serializer->buffer[serializer->buffer_size++] = target[0];
124 serializer->buffer[serializer->buffer_size++] = target[1];
125 serializer->buffer[serializer->buffer_size++] = target[2];
126 serializer->buffer[serializer->buffer_size++] = target[3];
127 serializer->buffer[serializer->buffer_size++] = target[4];
128 serializer->buffer[serializer->buffer_size++] = target[5];
129 serializer->buffer[serializer->buffer_size++] = target[6];
130 serializer->buffer[serializer->buffer_size++] = target[7];

so , this is a bug, I change the 2nd var to 4 or 8, then rebuild the code, it work fine.
plz the author fixed it for everyone. thank you.

@henryzxj
Copy link

@huasonglee ,thx. I have solved the problem just like you said.

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

2 participants