aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-13 20:32:31 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-13 20:32:31 +0000
commit4144504912954b0d31c5bbe5f13df5a4ec4f122a (patch)
tree115038a623b6c119bf7ff59f3359846e4e5e7e5f /modutils
parent2b2183a77d7e8a01723fb96e7a39f109b15475f4 (diff)
downloadbusybox-4144504912954b0d31c5bbe5f13df5a4ec4f122a.tar.gz
modutils: remove redundant sanitization
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modutils.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/modutils/modutils.c b/modutils/modutils.c
index ef4f6191b..44dae7bc5 100644
--- a/modutils/modutils.c
+++ b/modutils/modutils.c
@@ -5,7 +5,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
-
#include "modutils.h"
#ifdef __UCLIBC__
@@ -111,9 +110,9 @@ char * FAST_FUNC parse_cmdline_module_options(char **argv)
int FAST_FUNC bb_init_module(const char *filename, const char *options)
{
- size_t len = MAXINT(ssize_t);
+ size_t len;
char *image;
- int rc = ENOENT;
+ int rc;
if (!options)
options = "";
@@ -124,10 +123,12 @@ int FAST_FUNC bb_init_module(const char *filename, const char *options)
#endif
/* Use the 2.6 way */
+ len = INT_MAX - 4095;
+ rc = ENOENT;
image = xmalloc_open_zipped_read_close(filename, &len);
if (image) {
rc = 0;
- if (init_module(image, len, options ? options : "") != 0)
+ if (init_module(image, len, options) != 0)
rc = errno;
free(image);
}