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
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
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:
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
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
> > -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
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
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 -
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
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
-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
: [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
12 matches
Mail list logo