git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] mktag.c: tweak validation of tagger field and adjust test script

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 1, 2008, 05:39 UTC
Message-ID
<7vy77ygmlk.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<47F172E3.7010104@nrlssc.navy.mil>
Brandon Casey <casey@nrlssc.navy.mil> writes:
Show 12 quoted lines
>  	/*
>  	 * Check for correct form for name and email
>  	 * i.e. " <" followed by "> " on _this_ line
> +	 * No angle brackets within the name or email address fields.
> +	 * No spaces within the email address field.
>  	 */
>  	tagger_line += 7;
>  	if (!(lb = strstr(tagger_line, " <")) || !(rb = strstr(lb+2, "> ")) ||
> +		strpbrk(tagger_line, "<>\n") != lb+1 ||
> +		strpbrk(lb+2, "><\n ") != rb)
> +		return error("char" PD_FMT ": malformed tagger field",
>  			tagger_line - buffer);

This is the first use of strpbrk() in git.git codebase. Are BSD folks Ok with it (I understand this came from SVID 1, just like strspn we already use elsewhere)?

Previous: Brandon Casey
Message 12 of 12 in “mktag.c: improve verification of tagger field and tests”
  1. mktag.c: improve verification of tagger field and testsBrandon Casey, Mar 26, 2008
  2. Brandon CaseyMar 26, 2008
  3. Carlos RicaMar 26, 2008
  4. Brandon CaseyMar 26, 2008
  5. Brandon CaseyMar 26, 2008
  6. Junio C HamanoMar 26, 2008
  7. Brandon CaseyMar 26, 2008
  8. mktag.c: improve verification of tagger field and testsBrandon Casey, Mar 27, 2008
  9. Junio C HamanoMar 31, 2008
  10. Brandon CaseyMar 31, 2008
  11. mktag.c: tweak validation of tagger field and adjust test scriptBrandon Casey, Mar 31, 2008
  12. Junio C HamanoApr 1, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.