RE: [PATCH] Tools: hv: Fix for long file names from readdir

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

 




> -----Original Message-----
> From: Tomas Hozza [mailto:thozza@xxxxxxxxxx]
> Sent: Thursday, November 08, 2012 9:53 AM
> To: Olaf Hering
> Cc: gregkh@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> devel@xxxxxxxxxxxxxxxxxxxxxx; apw@xxxxxxxxxxxxx; jasowang@xxxxxxxxxx; 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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux