Check buffer.length at isGlitched function