Yes, you're right, if something reached the speed of light, it would have infinite mass, and that would cause some serious problems to the universe, and anyone who happened to be inside the universe at the time.
Fortunately, nothing can reach the speed of light, so the universe is safe. For now.