From: Tejun Heo <t...@kernel.org>
Date: Tue, 17 Nov 2015 14:40:37 -0500

> +     static char path_buf[PATH_MAX]; /* protected by kernfs_mutex */
> +     int len = strlen(path);
 ...
> +     if (len >= PATH_MAX)
> +             return NULL;
> +
> +     memcpy(path_buf, path, len + 1);

        static char path_buf[PATH_MAX]; /* protected by kernfs_mutex */
        int len = strlcpy(path_buf, path, PATH_MAX);
 ...
        if (len >= PATH_MAX)
                return NULL;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to