modutils-2.1.121 patch

Kurt Garloff (kurt@garloff.de)
Mon, 12 Apr 1999 13:26:49 +0200


--s2ZSL+KKDSLx8OML
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

Hi,

this has probably been reported before, but I wanted to send in just in cas=
e.
I fixed two of the problems with modutils-2.1.121:
* modinfo ran out of memory doing an infinite loop
* insmod spend it's time in an infinte loop parsing the same NULL argument
again and again

--- modutils-2.1.121/insmod/insmod.c.orig Mon Sep 14 20:55:17 1998
+++ modutils-2.1.121/insmod/insmod.c Mon Apr 12 12:59:57 1999
@@ -926,14 +926,14 @@
static int
new_process_module_arguments(struct obj_file *f, int argc, char **argv)
{
- while (argc > 0)
+ while (argc-- > 0)
{
char *p, *q, *key;
struct obj_symbol *sym;
char *contents, *loc;
int min, max, n;
=20
- p =3D *argv;
+ p =3D *argv++;
if ((q =3D strchr(p, '=3D')) =3D=3D NULL)
continue;
=20
@@ -1156,7 +1156,6 @@
return 0;
}
=20
- argc--, argv++;
}
=20
return 1;
--- modutils-2.1.121/insmod/modinfo.c.orig Mon Sep 14 20:55:28 1998
+++ modutils-2.1.121/insmod/modinfo.c Mon Apr 12 11:47:34 1999
@@ -457,7 +457,7 @@
error_file =3D "modinfo";
=20
while (optind < argc)
- show_module_info(argv[optind], fmtstr, do_parameters);
+ show_module_info(argv[optind++], fmtstr, do_parameters);
=20
return 0;
}

Regards,
--=20
Dipl.Phys. Kurt Garloff <kurt@garloff.de> [Wuppertal, FRG]
Plasma physics, high perf. computing [Linux-ix86,-axp, DUX]
PGP key: see mailheader / key servers [Linux SCSI driver: DC390]

--s2ZSL+KKDSLx8OML
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3in

iQCVAwUBNxHYeRaQN/7O/JIVAQHv6gP9GMW16CmoHDSVmljNJV1hWAgNS4eAaUJW
kojobV3NKZcElknKirSS5zyCh7NHdxze/5Nx8sNATKTD+NsHXYfyI2HH7mgfpSXR
VHNlyzkYaP26pPA6avVDLnG5sEeKTfmLyOA9RBWr3KjX6uscL9QLJHpMTdOCvY/R
XhfFLpFSCeg=
=5+iW
-----END PGP SIGNATURE-----

--s2ZSL+KKDSLx8OML--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/