Your sprintf() statement is likely overflowing the timeBuffer array. Why did you only reserve 6 bytes?
sprintf()
timeBuffer