I had some old milk in the fridge that smells like it’s on the edge. I decided to make yogurt with it. While I was heating it, lots of curds started to form. Is it safe to eat the yogurt that I’m making with it? 
I wouldn’t. If the milk curdled, it’s a sign of spoilage and the very last thing you want to do now is keep it in a warm environment for a prolonged time. And while many yogurt recipes include a pasteurization step where you heat the milk to near boiling (not all do, btw.), this will not turn clearly unsafe milk (as indicated by the curdling) into a base for a new product. Especially if the process includes a fermentation at warm temperatures for many hours. 