From 70fc82404f667321205f7260b268e5b3d24cb5ea Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 2 Jan 2011 22:22:32 +0000 Subject: [PATCH] sprintf() -> snprintf() (CID 7983). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40073 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/loader/loader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/system/boot/loader/loader.cpp b/src/system/boot/loader/loader.cpp index 37d06e73d5..157f789f18 100644 --- a/src/system/boot/loader/loader.cpp +++ b/src/system/boot/loader/loader.cpp @@ -174,7 +174,7 @@ load_modules(stage2_args *args, Directory *volume) for (int32 i = 0; sPaths[i]; i++) { char path[B_FILE_NAME_LENGTH]; - sprintf(path, "%s/boot", sPaths[i]); + snprintf(path, sizeof(path), "%s/boot", sPaths[i]); if (load_modules_from(volume, path) != B_OK) failed++; @@ -188,7 +188,7 @@ load_modules(stage2_args *args, Directory *volume) for (int32 i = 0; paths[i]; i++) { char path[B_FILE_NAME_LENGTH]; - sprintf(path, "%s/%s", sPaths[0], paths[i]); + snprintf(path, sizeof(path), "%s/%s", sPaths[0], paths[i]); load_modules_from(volume, path); } } @@ -213,7 +213,7 @@ load_modules(stage2_args *args, Directory *volume) // as this piece will survive a more intelligent module // loading approach... char path[B_FILE_NAME_LENGTH]; - sprintf(path, "%s/%s", sPaths[0], "file_systems"); + snprintf(path, sizeof(path), "%s/%s", sPaths[0], "file_systems"); load_modules_from(volume, path); }