Re: [PATCH 1/2] commit: reject invalid UTF-8 codepoints

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

 



brian m. carlson:

+		/* Check the value here */
+		if (codepoint >= 0xd800 && codepoint <= 0xdfff)
+			return bad_offset;

if ((x & 0xFFFFF800) == 0xD800)

is slightly shorter, albeit a bit more difficult to read.

Please also consider adding some commentary as to what you are checking here, as it is not obvious unless you know Unicode well.

--
\\// Peter - http://www.softwolves.pp.se/
--
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]