datamapper / do

DataObjects
147 stars 73 forks source link

Fix segmentation fault inside of do_oracle #36

Closed flavio closed 12 years ago

flavio commented 12 years ago

A segmentation fault took place inside of the do_oracle adapter while converting a Time object into a DateTime one. A long int value was given to the DateTime constructor rather then the proper ruby data structure. This caused the underlying ruby code to access a wrong portion of memory. The ruby vm crashed inside of the offset_to_sec function (ext/date/date_core.c:2304).

This fix has been tested with ruby 1.9.3p194.

dbussink commented 12 years ago

Good catch, I'll see if I can push out a release shortly