That has to stay static, otherwise can end up in strange values, being on stack. I pushed a commit to reset the content of the buffer when using the function, no matter there is or not a value to retrieve. Can you test with master or with the patch to see if all ok? If yes, it will be backported.