[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

bblaunch segfault patch



Hi,

I've no idea to whom I should send this patch nor the procedure for doing so, but when I compiled
bblaunch on Red Hat 8, it ran fine, but on Fedora Core 2, it kept segfaulting (no core dump).

I tracked down the problem to a bad cast and, as it turns out, the variable in question wasn't
even being used.  I deleted the line and everything works just fine.  Patch is below my signoff.

Cheers,
Ovid

--
Only in bblaunch-0.0.3: bblaunch
diff -u bblaunch-0.0.3.orig/bblaunch.c bblaunch-0.0.3/bblaunch.c
--- bblaunch-0.0.3.orig/bblaunch.c      2004-08-08 10:14:14.560014872 -0700
+++ bblaunch-0.0.3/bblaunch.c   2004-08-08 10:15:09.425674024 -0700
@@ -170,8 +170,6 @@
        launchargs.iconic = False;
        launchargs.pause = 1000;
 
-       sprintf(launchargs.call, "%s", (char *)atoi(argv[0]));
-
        i = 1;
        valargs = 1;
        while ((i < argc) && valargs) {
diff -u bblaunch-0.0.3.orig/bblaunch.h bblaunch-0.0.3/bblaunch.h
--- bblaunch-0.0.3.orig/bblaunch.h      2004-08-08 10:14:14.560014872 -0700
+++ bblaunch-0.0.3/bblaunch.h   2004-08-08 10:15:16.908536456 -0700
@@ -1,7 +1,6 @@
 
 typedef struct LArgs
   {
-    char call[1024];
     char command[1024];
     unsigned long flags, attrib, workspace, stack, decoration;
     unsigned long pause;
Only in bblaunch-0.0.3: bblaunch.o
Only in bblaunch-0.0.3: config.cache
Only in bblaunch-0.0.3: config.log
Only in bblaunch-0.0.3: config.status
Only in bblaunch-0.0.3: Makefile


=====
Silence is Evil            http://users.easystreet.com/ovid/philosophy/indexdecency.htm
Ovid                       http://www.perlmonks.org/index.pl?node_id=17000
Web Programming with Perl  http://users.easystreet.com/ovid/cgi_course/



Reply to: