contrib/git-credential-gnome-keyring.c: ensure buffer is non-empty before accessing