[mapserver-users] double fclose makes mapserver segfault

Daniel Morissette morissette at dmsolutions.ca
Wed Jul 31 17:23:19 EDT 2002


There is definitely a bug there, we've filed this in bugzilla and we're
waiting on feedback from Steve before applying the fix.  For the full
details, see:
  http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=178

Daniel


Ricky Jo wrote:
> 
> Hi,
> 
> Whenever I had a non existant image referenced in a
> symbol files, mapserver segfaults.
> Investigating a little closer reveals that this is
> caused by a fclose after the file is closed:
> 
> in  msLoadSymbolSet (mapsymbol.c) , we can see a
> flclose(msyyin) at the end of the
> function: the stream is closed in all cases.
> But in there is an error in loadSymbol, the stream is
> closed.
> After, it will be closed again in msLoadSymbolSet, and
> it segfaults.
> 
> For the solution, either it is up to the caller to
> close the stream on
> error, or the caller should not close it if an error
> is
> returned. Perhaps the first solution is more
> orthogonal, but as
> msLoadSymbolSet is not the only caller of loadSymbol
> (also
> loadMapInternal) a generic solution is needed.
> 
> Cheers
> 
> Ricky
>



More information about the mapserver-users mailing list