summaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorEric Andersen2000-08-11 17:45:02 +0000
committerEric Andersen2000-08-11 17:45:02 +0000
commitf9ca653faa5ee3a56409221d4627679d6a9304a9 (patch)
treea9590a079786b7b4581750d8eb60502fc9a2c153 /utility.c
parent88f50b6bf5e79ca9d5f30e5899ace1cbda0950a4 (diff)
downloadbusybox-f9ca653faa5ee3a56409221d4627679d6a9304a9.zip
busybox-f9ca653faa5ee3a56409221d4627679d6a9304a9.tar.gz
Added fix from David Vrabel <dvrabel@arcom.co.uk> for a
buffer overrun in find_real_root_device(), fixing bug #1019 -Erik
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utility.c b/utility.c
index 3422d99..28e333e 100644
--- a/utility.c
+++ b/utility.c
@@ -1636,7 +1636,7 @@ extern int find_real_root_device_name(char* name)
if (strcmp(entry->d_name, "..") == 0)
continue;
- sprintf( fileName, "/dev/%s", entry->d_name);
+ snprintf( fileName, strlen(name)+1, "/dev/%s", entry->d_name);
if (stat(fileName, &statBuf) != 0)
continue;