rasplit rc.14 segfault when runned without arguments

VIEAU Cédric 172196 cedric.vieau at cea.fr
Tue Jun 27 08:03:58 EDT 2006


Hi,

raplit rc.14 generates a segmentation fault when runned without arguments :

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912502359760 (LWP 30136)]
0x00000000004031a8 in ArgusClientInit (parser=0x2aaaaaac4010) at ./rasplit.c:63
63            if (ArgusParser->ArgusWfileList->start != NULL) {
(gdb) p/x ArgusParser->ArgusWfileList
$2 = 0x0

I tested the others raclients, only raplit has this problem. Here is a patch :

--- clients/rasplit.c.orig      2006-06-27 13:43:22.000000000 +0200
+++ clients/rasplit.c   2006-06-27 13:44:05.000000000 +0200
@@ -60,7 +60,7 @@
       if (parser->aflag)
          nadp->slen = parser->aflag;
 
-      if (ArgusParser->ArgusWfileList->start != NULL) {
+      if ((ArgusParser->ArgusWfileList != NULL) && (ArgusParser->ArgusWfileList->start != NULL)) {
          count = ArgusParser->ArgusWfileList->count;
          for (i = 0; i < count; i++) {
             if ((wfile = (struct ArgusWfileStruct *) ArgusPopFrontList(parser->ArgusWfileList, ARGUS_NOLOCK)) != NULL) {

Regards,
Cedric



More information about the argus mailing list