How many days can cooked chicken stay in the fridge before it becomes risky to eat

How many days can cooked chicken stay in the fridge before it becomes risky to eat