Repository navigation
Now allocates properly sized result buffer. - #3657
Conversation
|
@NovaDenizen, thanks for your PR! By analyzing the annotation information on this pull request, we identified @23Skidoo and @phadej to be potential reviewers |
|
Thanks! I'll wait for Appveyor tests to go green and then I'll merge it. (I checked to make sure we weren't committing an off-by-one-error. The docs are very confusing in this respect but I believe the code is right: querying for the needed buffer size will return enough space for the null byte, even though the success return does NOT include the null byte. Pshaw!) |
|
@NovaDenizen I just realized that this code could have been made more robust in one slight way: we should check the return value of the second invocation and error if it is greater than the buffer size we passed in (this would have also caught the previous problem, instead of passing a half-constructed buffer back to the user.) Now that the code is right, I guess it's unnecessary though! |
|
LGTM. Thanks, @NovaDenizen! |
|
Also cherry-picked into 1.24. |
See #3649