moai / moai-dev

This is the development repo of Moai SDK.
http://getmoai.com
944 stars 313 forks source link

Free the newly allocated string, not the local buffer #1192

Closed KJ4ERJ closed 7 years ago

KJ4ERJ commented 7 years ago

This code only happens when the newly formatted string is larger than the size of the local buffer (1024 bytes). I uncovered the issue when I did a very long print from lua code.

moai-sdk commented 7 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 7 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 7 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 7 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 7 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 7 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 7 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 7 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

moai-sdk commented 7 years ago

Can one of the admins verify this patch? Type 'test' in a comment to start test.

seclorum commented 7 years ago

test

seclorum commented 7 years ago

This is a clear fix.