Fix memcpy size in pc_patch_wkb_set_int32#226
Conversation
|
@elemoine Nice, good catch! Do you think that a unit test could be added to underline the underlying bugfix? |
We have unit tests for functions in |
Ok for doing this in another PR. However, I'm wondering if we should move
@elemoine What do you think? But we'll deal with that later. Thanks for the bugfix! |
|
In general the |
if you recall, I tested that move a while back, eg in this commit, which fixed the memcpy issue while movibg the code and properly handling degenerate bounds : would you be interested in a rebased PR using this commit? |
|
@mbredif yep, that looks like a very good change! A PR would be great. |
Using -Wall and -O2 gcc 8.2.0 warns us about memcpy's that are out-of-bounds.
gcc is correct, there is a bug in pc_patch_wkb_set_int32. We should copy 4 bytes instead of 8 bytes.