lkml.org 
[lkml]   [2012]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] Tools: hv: Fix for long file names from readdir
Date


> -----Original Message-----
> From: Tomas Hozza [mailto:thozza@redhat.com]
> Sent: Thursday, November 08, 2012 9:53 AM
> To: Olaf Hering
> Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; apw@canonical.com; jasowang@redhat.com; KY
> Srinivasan
> Subject: Re: [PATCH] Tools: hv: Fix for long file names from readdir
>
> > > - char dev_id[256];
> > > + char dev_id[512];
> >
> > Shouldnt that be PATH_MAX or similar?
>
> dirent->d_name should be PATH_MAX, but it is mostly
> not guaranteed. And then the dev_id is concatenated
> with two strings so it can exceed 256 bytes.

PATH_MAX (currently 4096 bytes) I think should suffice.

Regards,

K. Y

\
 
 \ /
  Last update: 2012-11-08 17:41    [W:0.521 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site