diff --git a/smartmontools/CHANGELOG b/smartmontools/CHANGELOG index eb034b31c0fba948d5515f00b3d3d7481a33d847..c731102b173be4f07d24ac9377315171b7867972 100644 --- a/smartmontools/CHANGELOG +++ b/smartmontools/CHANGELOG @@ -43,6 +43,8 @@ NOTES FOR FUTURE RELEASES: see TODO file. <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> + [CF] Linux: Fix segfault in 3ware interface (ticket #22). + [MS] knowndrives.cpp updates: - Hitachi Deskstar 7K2000 - Seagate Momentus 7200 FDE.2 series diff --git a/smartmontools/os_linux.cpp b/smartmontools/os_linux.cpp index 7c485ffca4076aab343877b8c4bbe156da36308f..5993f113dba5b4629ebd8df980846f0d0a754c41 100644 --- a/smartmontools/os_linux.cpp +++ b/smartmontools/os_linux.cpp @@ -1541,7 +1541,7 @@ bool linux_escalade_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_out passthru->size++; } else - set_err(EINVAL); + return set_err(EINVAL); // Now send the command down through an ioctl() int ioctlreturn; @@ -1605,7 +1605,7 @@ bool linux_escalade_device::ata_pass_through(const ata_cmd_in & in, ata_cmd_out } // Return register values - { + if (passthru) { ata_out_regs_48bit & r = out.out_regs; r.error = passthru->features; r.sector_count_16 = passthru->sector_count;