zeromq / erlzmq2

Erlang binding for 0MQ (v2)
http://zeromq.org/
MIT License
165 stars 63 forks source link

This bug that this commit fixes causes getsockopt to randomly fail. The bug also makes memory overwrites possible. #30

Closed epatey closed 12 years ago

epatey commented 12 years ago

Fix uninitialized variable 'option_len' in getsockopt. The parameter option_len is a pointer to an in/out variable. On input, it must specify the size of the output buffer. When uninitialized to a value smaller than the result of getsockopt, the method returns EINVAL.

yrashk commented 12 years ago

Sorry for the delay, I somehow missed my email notification on this. I am having somebody who's having a similar problem test your fork.

yrashk commented 12 years ago

It looks like it helped that person. Merging this in.

Thanks a lot!