diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-13 20:32:31 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-13 20:32:31 +0000 |
commit | 4144504912954b0d31c5bbe5f13df5a4ec4f122a (patch) | |
tree | 115038a623b6c119bf7ff59f3359846e4e5e7e5f /modutils/modutils.c | |
parent | 2b2183a77d7e8a01723fb96e7a39f109b15475f4 (diff) | |
download | busybox-w32-4144504912954b0d31c5bbe5f13df5a4ec4f122a.tar.gz busybox-w32-4144504912954b0d31c5bbe5f13df5a4ec4f122a.tar.bz2 busybox-w32-4144504912954b0d31c5bbe5f13df5a4ec4f122a.zip |
modutils: remove redundant sanitization
Diffstat (limited to 'modutils/modutils.c')
-rw-r--r-- | modutils/modutils.c | 9 |
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 @@ | |||
5 | * | 5 | * |
6 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
7 | */ | 7 | */ |
8 | |||
9 | #include "modutils.h" | 8 | #include "modutils.h" |
10 | 9 | ||
11 | #ifdef __UCLIBC__ | 10 | #ifdef __UCLIBC__ |
@@ -111,9 +110,9 @@ char * FAST_FUNC parse_cmdline_module_options(char **argv) | |||
111 | 110 | ||
112 | int FAST_FUNC bb_init_module(const char *filename, const char *options) | 111 | int FAST_FUNC bb_init_module(const char *filename, const char *options) |
113 | { | 112 | { |
114 | size_t len = MAXINT(ssize_t); | 113 | size_t len; |
115 | char *image; | 114 | char *image; |
116 | int rc = ENOENT; | 115 | int rc; |
117 | 116 | ||
118 | if (!options) | 117 | if (!options) |
119 | options = ""; | 118 | options = ""; |
@@ -124,10 +123,12 @@ int FAST_FUNC bb_init_module(const char *filename, const char *options) | |||
124 | #endif | 123 | #endif |
125 | 124 | ||
126 | /* Use the 2.6 way */ | 125 | /* Use the 2.6 way */ |
126 | len = INT_MAX - 4095; | ||
127 | rc = ENOENT; | ||
127 | image = xmalloc_open_zipped_read_close(filename, &len); | 128 | image = xmalloc_open_zipped_read_close(filename, &len); |
128 | if (image) { | 129 | if (image) { |
129 | rc = 0; | 130 | rc = 0; |
130 | if (init_module(image, len, options ? options : "") != 0) | 131 | if (init_module(image, len, options) != 0) |
131 | rc = errno; | 132 | rc = errno; |
132 | free(image); | 133 | free(image); |
133 | } | 134 | } |