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

2012-11-26 Thread KY Srinivasan
asow...@redhat.com; > Tomas Hozza > Subject: [PATCH] Tools: hv: Fix for long file names from readdir > > kvp_get_if_name and kvp_mac_to_if_name copy strings into statically > sized buffers which could be too small to store really long names. > > Buffer sizes have been change

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

2012-11-26 Thread KY Srinivasan
Hozza Subject: [PATCH] Tools: hv: Fix for long file names from readdir kvp_get_if_name and kvp_mac_to_if_name copy strings into statically sized buffers which could be too small to store really long names. Buffer sizes have been changed to PATH_MAX, include limits.h where PATH_MAX is defined

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

2012-11-09 Thread Tomas Hozza
kvp_get_if_name and kvp_mac_to_if_name copy strings into statically sized buffers which could be too small to store really long names. Buffer sizes have been changed to PATH_MAX, include "limits.h" where PATH_MAX is defined was added and length checks ware added via snprintf. Signed-off-by:

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

2012-11-09 Thread Tomas Hozza
kvp_get_if_name and kvp_mac_to_if_name copy strings into statically sized buffers which could be too small to store really long names. Buffer sizes have been changed to PATH_MAX, include limits.h where PATH_MAX is defined was added and length checks ware added via snprintf. Signed-off-by: Tomas

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

2012-11-08 Thread KY Srinivasan
m; 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

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

2012-11-08 Thread Tomas Hozza
> > -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. After discussion with K. Y. Srinivasan I

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

2012-11-08 Thread Olaf Hering
On Thu, Nov 08, Tomas Hozza wrote: > kvp_get_if_name and kvp_mac_to_if_name copy strings into statically > sized buffers which could be too small to store really long names. > - char dev_id[256]; > + char dev_id[512]; Shouldnt that be PATH_MAX or similar? Olaf -- To unsubscribe from

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

2012-11-08 Thread Tomas Hozza
kvp_get_if_name and kvp_mac_to_if_name copy strings into statically sized buffers which could be too small to store really long names. Buffer sizes have been increased and length checks added via snprintf. Signed-off-by: Tomas Hozza --- tools/hv/hv_kvp_daemon.c | 25 -

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

2012-11-08 Thread Tomas Hozza
kvp_get_if_name and kvp_mac_to_if_name copy strings into statically sized buffers which could be too small to store really long names. Buffer sizes have been increased and length checks added via snprintf. Signed-off-by: Tomas Hozza tho...@redhat.com --- tools/hv/hv_kvp_daemon.c | 25

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

2012-11-08 Thread Olaf Hering
On Thu, Nov 08, Tomas Hozza wrote: kvp_get_if_name and kvp_mac_to_if_name copy strings into statically sized buffers which could be too small to store really long names. - char dev_id[256]; + char dev_id[512]; Shouldnt that be PATH_MAX or similar? Olaf -- To unsubscribe from this

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

2012-11-08 Thread Tomas Hozza
-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. After discussion with K. Y. Srinivasan I just

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

2012-11-08 Thread KY Srinivasan
: [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