FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-27-2011, 01:46 PM
David Cantrell
 
Default Bump the implementation limit on the number of modules in modLoaded.

Ugh, geez. Yes, ack.

On 06/27/2011 09:50 AM, Ales Kozumplik wrote:

After 08a79cbfb36b3a339a2aa34f02eec23b021a70bf we are over the current and
the loader segvs quite reliably.

Resolves: rhbz#716836
---
loader2/modules.c | 4 +++-
loader2/modules.h | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/loader2/modules.c b/loader2/modules.c
index 7f4dce3..cb34dff 100644
--- a/loader2/modules.c
+++ b/loader2/modules.c
@@ -335,6 +335,9 @@ static int loadModule(const char * modName, struct extractedModule * path,

if (!rc) {
int num = modLoaded->numModules;
+ if (num>= MODULES_MAXLOADED)
+ logMessage(CRITICAL, "The number of loaded modules is over the "
+ "implementation limit.");

modLoaded->mods[num].name = strdup(modName);
modLoaded->mods[num].weLoaded = 1;
@@ -390,7 +393,6 @@ static int loadModule(const char * modName, struct extractedModule * path,
} else {
newArgs = NULL;
}
-
modLoaded->mods[modLoaded->numModules++].args = newArgs;
}

diff --git a/loader2/modules.h b/loader2/modules.h
index 536a199..a12a235 100644
--- a/loader2/modules.h
+++ b/loader2/modules.h
@@ -4,6 +4,8 @@
#include "moduleinfo.h"
#include "moduledeps.h"

+#define MODULES_MAXLOADED 256
+
typedef struct moduleList_s * moduleList;

struct loadedModuleInfo {
@@ -23,7 +25,7 @@ struct extractedModule {
};

struct moduleList_s {
- struct loadedModuleInfo mods[100];
+ struct loadedModuleInfo mods[MODULES_MAXLOADED];
int numModules;
};





--
David Cantrell <dcantrell@redhat.com>
Supervisor, Installer Engineering Team
Red Hat, Inc. | Westford, MA | EST5EDT

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 06-27-2011, 02:03 PM
Chris Lumens
 
Default Bump the implementation limit on the number of modules in modLoaded.

> Ugh, geez. Yes, ack.

The good news is this does not appear to be a problem on master.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 07:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org