This was discussed in IRC already, reproducing here for posterity:

The `eq()` method here has two problems. The first is that it doesn't do null-checking (on both `self` and `other`), and the second is that the length passed to `memcmp()` needs to be `min(self.len(), other.len())`. Alternatively, `memcmp()` could be replaced with `strcmp()`, which should be more efficient as it will only iterate the buffers once and will stop immediately on inequality.