parsedate.c: check sscanf result before passing it to strlen