Helper function get_label()

The helper function ssize_t get_label(char *dest, const char *src)
validates the given label and copies it to the dest buffer if
available.