If XXHash is passed a zero-length Buffer it segfaults. (I'm in Node v0.10.3)
For example:
var XXHash = require('xxhash');
console.log(XXHash.hash(new Buffer(""), 0xCAFEBABE));
// terminated by signal SIGSEGV (Address boundary error)
I'm currently working around this by testing the length of the Buffer before hashing, but segfaulting, instead of throwing an exception, is less than ideal behavior.
If XXHash is passed a zero-length Buffer it segfaults. (I'm in Node v0.10.3)
For example:
I'm currently working around this by testing the length of the Buffer before hashing, but segfaulting, instead of throwing an exception, is less than ideal behavior.