add buf overflow check