I saw this little dentation on the welding between the down tube and the head tube, looked suspicious to me, is it safe to ride?
Safe to ride? Yes. If a (metal) frame fails, it won't kill you, as diamond frames have lots of inherent redundancy. Most likely you are able to limp home with your bike. So based on that nearly every frame is safe. A non-diamond frame might be a different matter since they can fail suddenly and cause you to crash, hurting yourself badly. But a diamond frame is practically always safe.
Such weakness would however be very dangerous on a fork, and finding a compatible replacement fork might not be easy. On stem, seatpost or handlebar it would also be very dangerous but fortunately stems, seatposts and handlebars are cheap to replace. If a fork, stem, seatpost or handlebar fails, you will hurt yourself badly.
However, the big question you should be asking: will the frame be durable? Welds are always weak areas and any dent could weaken the weld there. If your frame fails for 1 years after buying it and it won't kill or hurt you and you can limp home, you are still left with a bicycle that's broken, i.e. you lose whatever money you put into that bicycle.
Personally I wouldn't buy the bicycle because the frame not only has a dent at a weld, but also has deteriorating paint and also the headset lower cup is so rusty it calls into question how rusty the bearing itself is. Even if it's just cosmetic on the headset, replacing it won't be cheap because a decent set of headset tools costs over 100 dollars/euros/pounds/whatever, and a bicycle shop charges probably half that to swap a headset. I suspect the bicycle is so old that it has a threaded headset -- those require a new one with compatible stack height to replace (if the stack height of the new unit is lower you can always try to see if you can find suitable spacers; if the stack height of the new unit is higher then you're out of luck).
Also the brake hardware is completely rusted out. It's not only ugly but I also suspect similar rust can be seen in every part of the bike. The covered picture shows only a very small percentage of the bike.
I wouldn't pay any money for this bike.