lib/util: Avoid sprintf in mac_str