verify if two buffers are equal