fix bug: stack smashing detected
len of mac array is too small