TIMATIC, the IATA database, is available to you free at a number of locations including the *A website (link below). According to TIMATIC and presuming that you will have been in Hungary for at least six days, you can transit IST without a visa (<24 hours + onward ticket).
Not suggesting that <6 days in Hungary changes things, but you will need to check that on TIMATIC.
Whatever you do, bring a paper printout with you. Arguing with check-in agents is a bad thing.
http://www.staralliance.com/en/servi...sa-and-health/