gousb icon indicating copy to clipboard operation
gousb copied to clipboard

Fix a segfault caused by invalid Go pointer

Open zagrodzki opened this issue 7 years ago • 1 comments

Do not pass a Go pointer to the C-land. Instead use the C pointer to struct_libusb_transfer as a key to the transfer map.

This addresses issue #50. The change is a backport of mechanism used in github.com/google/gousb.

zagrodzki avatar Jun 13 '17 10:06 zagrodzki

Coverage Status

Coverage increased (+0.06%) to 65.658% when pulling 70a69d2e95b59220959b6e405811c7eed3693ab0 on fix-invalid-pointer-access into 99e7ca4f01738df8a0d994f04e6cc05f8bd51c5e on master.

coveralls avatar Jun 13 '17 10:06 coveralls