Ticket #220 (closed defect: fixed)
Potential problem with recursive calls to msBuildPath()
|Reported by:||dmorissette||Owned by:||jlacroix|
|Component:||MapServer C Library||Version:||4.0|
There are a few places (at least in mapraster.c) where we find recursive msBuildPath() calls using the same temporary buffer, i.e. msBuildPath(szPath, msBuildPath(szPath, .., ...), filename); This can result in unpredictable behaviors on some platforms since the function contains a sprintf() call that would end up reading from and writing to the same string buffer. I suggest that we create a new msBuildPath3() that takes 3 path components (2 paths and a filename) and combines them and then replace all occurences of recursive calls in MapServer with this new function. Julien, please talk to me when you're ready to implement this.
Note: See TracTickets for help on using tickets.