Skip to content

Conversation

redboltz
Copy link
Contributor

@redboltz redboltz commented Jul 3, 2020

No description provided.

redboltz added 2 commits July 3, 2020 09:18
*buffer means sbuffer, zbuffer, fbuffer, and vrefbuffer.

The logic is as follows:

if buf is NULL
   if len is 0
      do nothing return 0 (success)
   else
      assertion fail
else
   set contants to *buffer
Propagate CXXFLAGS correctly.
Set CFLAGS in the same way.
@redboltz redboltz force-pushed the fix_buffer_ptr_size branch from 51c43da to 208ec65 Compare July 3, 2020 00:30
@redboltz
Copy link
Contributor Author

redboltz commented Jul 3, 2020

I considered that sbuffer fix should be applied other buffers.
Then I noticed that I can improve error handling.
The original fix checked source buffer at the last part of the function. Before the checking, the target buffer could expanded.
It's not harmful but not so good.
So I moved to the checking at the beginning of the function.

@codecov-commenter
Copy link

Codecov Report

Merging #899 into c_master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           c_master     #899   +/-   ##
=========================================
  Coverage     52.82%   52.82%           
=========================================
  Files             8        8           
  Lines          1043     1043           
=========================================
  Hits            551      551           
  Misses          492      492           

@redboltz redboltz merged commit 4f59b98 into msgpack:c_master Jul 3, 2020
@redboltz redboltz deleted the fix_buffer_ptr_size branch July 3, 2020 10:42
@redboltz redboltz added the C label Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants