Re: [PATCH v9 6/8] convert: check for detectable errors in UTF encodings

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

 



lars.schneider@xxxxxxxxxxxx writes:

> +static int validate_encoding(const char *path, const char *enc,
> +		      const char *data, size_t len, int die_on_error)
> +{
> +	if (!memcmp("UTF-", enc, 4)) {

Does the caller already know that enc is sufficiently long that
using memcmp is safe?



[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