There is a buffer overflow in netatalk_conf.c which has the potential to cause crashes and causes subtle memory corruption FreeBSD (corrupts v_cnidport). The problem stems from allocating tmpname in creatvol using strdup. Later, tmpname is called as a destination pointer for convert_charset with a maximum length of AFPVOL_U8MNAME. This length can be potentially much larger than the amount of memory allocated by strdup, causing buffer overflow.
I propose the attached patch to work around this issue.