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

[PATCH] Fix blank network device descriptions in the loader. (#501757)



This appears to be the source of the problem, and fixes the issue
in brief testing. It is completely baffling to me why this would only
manifest now; it's not like this code has changed since it was
added.

Signed-off-by: Bill Nottingham <notting redhat com>
---
 isys/devices.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/isys/devices.c b/isys/devices.c
index e312a43..1efff62 100644
--- a/isys/devices.c
+++ b/isys/devices.c
@@ -178,6 +178,7 @@ storagedone:
             snprintf(path, 64, "/sys/class/net/%s/address", ent->d_name);
             fd = open(path, O_RDONLY);
             if (fd != -1) {
+                memset(buf, '\0', 64);
                 if (read(fd, buf, 64) > 0) {
                     int i;
                     for (i = (strlen(buf)-1); isspace(buf[i]); i--)
-- 
1.6.2.2


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