qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [V5 PATCH 4/8] virtio-9p: Add support to open a file in


From: Stefan Hajnoczi
Subject: [Qemu-devel] Re: [V5 PATCH 4/8] virtio-9p: Add support to open a file in chroot environment
Date: Thu, 17 Feb 2011 10:23:00 +0000

On Wed, Feb 16, 2011 at 12:23 PM, M. Mohan Kumar <address@hidden> wrote:
> +/* Helper routine to fill V9fsFileObjectRequest structure */
> +static void fill_request(V9fsFileObjectRequest *request, const char *path,
> +                FsCred *credp)
> +{
> +    memset(request, 0, sizeof(*request));
> +    request->data.path_len = strlen(path);
> +    strcpy(request->path.path, (path));

It's not obvious that this strcpy() is safe.  I tried following this
back into hw/virtio-9p.c and I don't see an explicit PATH_MAX length
limit for path.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]