When corn on the cob is going bad the silk at the top of the will become slimy and start to turn brown.
The corn husks will also turn yellow and become dry at the tips of the corn husks.
If it gets to that point then it should be thrown out and not eaten.
Raw corn on the cob will be good to eat for up to 3 days and after 3 days the corn on the cob should be thrown out because it will likely be bad and not safe to eat.