Change license of noise implementation to Simplified BSD
Prevent invalid memory access under failure conditions