It’s common for many short words (fast, smart, safe) to work both as adjectives and adverbs. For this particular use of ‘safe’, beware that it’s not grammatically approved, so don’t use it on a test. (Note, a different expression, ‘play it safe’, is perfectly fine. ) I say both.