Buffer security checks