rails-sqlserver / tiny_tds

TinyTDS - Simple and fast FreeTDS bindings for Ruby using DB-Library.
Other
606 stars 190 forks source link

Fix login timeout segmentation faults #497

Closed bvogelzang closed 3 years ago

bvogelzang commented 3 years ago

Summary

Fixes a bug introduced in #481. When a login timeout occurs, userdata has not been initialized so it is a null pointer. Updating the timeout error handling to detect this so no segmentation fault occurs. Added a test to ensure login timeouts are working as expected.