W6 2377 then QR 3516 at Barcelona
Budapest → Barcelona → Málaga
Timetable, Barcelona time
20:05W6 2377 from Budapest at the gate
19:25QR 3516 to Málaga leaves the gate
23 h 20 apart on the timetable, overnight
QR 3516 leaves 23 h 20 after W6 2377 arrives on the timetable: more than half a day, so not a connection we count.