Fix check of buffer against TA private memory