Skip to content

Fix buffer size to ensure#216

Merged
komamitsu merged 2 commits intomsgpack:v07-developfrom
xerial:v07-fix-packstring
Apr 9, 2015
Merged

Fix buffer size to ensure#216
komamitsu merged 2 commits intomsgpack:v07-developfrom
xerial:v07-fix-packstring

Conversation

@xerial
Copy link
Member

@xerial xerial commented Apr 8, 2015

No description provided.

@xerial xerial assigned muga and komamitsu and unassigned muga Apr 8, 2015
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ensure(int byteSizeToRead) looks to guarantee to prepare a buffer requested as byteSizeToRead. So readLen should be simply strLen - cursor? If so, maybe we can remove the outer loop.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like so. i'll remove it

@xerial
Copy link
Member Author

xerial commented Apr 9, 2015

@komamitsu
Fixed to utilize existing buffer rather than ensuring the buffer size for the whole string size.

@komamitsu
Copy link
Member

LGTM

komamitsu added a commit that referenced this pull request Apr 9, 2015
@komamitsu komamitsu merged commit e15e30f into msgpack:v07-develop Apr 9, 2015
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

Successfully merging this pull request may close these issues.

3 participants