bad memory access, should not be ptr
bugfix #249
pull ghost wants to merge 1 commits into bitcoin-core:master from changing 1 files +1 −1-
ghost commented at 11:33 PM on May 10, 2015: none
-
fix segfault due to ptr access 06d0bb509c
-
ghost commented at 11:44 PM on May 10, 2015: none
Hmm, maybe the fix is wrong, but the function signature expects an int, and the call is passing a pointer
-
gmaxwell commented at 11:57 PM on May 10, 2015: contributor
The code is correct. The decompress function takes a pointer to an int; this pointer is derefernced before passing to the internal parse function. The reason the decompress input is a pointer is because the length is an in/out field-- it gets updated with the new length after decompression.
(As you can see from the travis results, this function is extensively tested and the change breaks the tests).
I am guessing that the application code you are using is incorrectly passing in an integer (with type coercion to make it compile).
- unknown closed this on May 10, 2015
-
ghost commented at 11:59 PM on May 10, 2015: none
Yea, I was passing in a integer and it was being coerced, completely my fault. Apologies for the noise.
- unknown deleted the branch on May 10, 2015