Yeah - already got that one, in among a lot of little stuff found by
valgrind that I'm just about to commit.

But thanks!

-----Burton

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf
> Of Meloun Michal
> Sent: Sunday, February 01, 2004 4:56 AM
> To: [EMAIL PROTECTED]
> Subject: [Ntop-dev] BUG - Segmentation faults wher reading .gz files
> (util.c)
>
>
> See patch.
>  Michal Meloun
>
>
> --- util.c.orig       Sun Feb  1 11:17:35 2004
> +++ util.c    Sun Feb  1 11:18:21 2004
> @@ -5520,7 +5520,7 @@
>    for(idx=0; myGlobals.configFileDirs[idx] != NULL; idx++) {
>
>  #ifdef MAKE_WITH_ZLIB
> -      compressedFormat = 1;
> +      *compressedFormat = 1;
>        snprintf(tmpFile, sizeof(tmpFile), "%s/%s.gz",
> myGlobals.configFileDirs[idx], fileName);
>        if(logTag != NULL) traceEvent(CONST_TRACE_NOISY, "%s:
> Checking '%s'", logTag, tmpFile);
>        fd = gzopen(tmpFile, "r");
> @@ -5528,7 +5528,7 @@
>  #endif
>
>        if(fd == NULL) {
> -     compressedFormat = 0;
> +     *compressedFormat = 0;
>       snprintf(tmpFile, sizeof(tmpFile), "%s/%s",
> myGlobals.configFileDirs[idx], fileName);
>          if(logTag != NULL) traceEvent(CONST_TRACE_NOISY, "%s:
> Checking '%s'", logTag, tmpFile);
>       fd = fopen(tmpFile, "r");
> @@ -5558,7 +5558,7 @@
>                         "%s: File '%s' does not need to be reloaded",
>                         logTag, tmpFile);
>  #ifdef MAKE_WITH_ZLIB
> -          if(compressedFormat)
> +          if(*compressedFormat)
>              gzclose(fd);
>            else
>  #endif
>
> _______________________________________________
> Ntop-dev mailing list
> [EMAIL PROTECTED]
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev
>

_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

Reply via email to