[mapserver-users] double fclose makes mapserver segfault
Ricky Jo
ricky_georgy at yahoo.fr
Tue Jul 30 13:18:53 PDT 2002
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
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
More information about the MapServer-users
mailing list