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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brandon Casey <casey@xxxxxxxxxxxxxxx> writes:

>  	/*
>  	 * 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)?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux