core: fix size used in some snprintf