lkml.org 
[lkml]   [1999]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectmodutils-2.1.121 patch
Hi,

this has probably been reported before, but I wanted to send in just in case.
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;

- p = *argv;
+ p = *argv++;
if ((q = strchr(p, '=')) == NULL)
continue;

@@ -1156,7 +1156,6 @@
return 0;
}

- argc--, argv++;
}

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 = "modinfo";

while (optind < argc)
- show_module_info(argv[optind], fmtstr, do_parameters);
+ show_module_info(argv[optind++], fmtstr, do_parameters);

return 0;
}

Regards,
--
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]
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.042 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site