Skip to content

Commit 907cd5d

Browse files
rouaultgithub-actions[bot]
authored andcommitted
loadProjection(): fix memleak in case of repeated PROJECTION block
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52252
1 parent 6cdf2cd commit 907cd5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mapfile.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ static int loadProjection(projectionObj *p)
11421142

11431143
p->gt.need_geotransform = MS_FALSE;
11441144

1145-
if ( p->proj != NULL ) {
1145+
if ( p->proj != NULL || p->numargs != 0 ) {
11461146
msSetError(MS_MISCERR, "Projection is already initialized. Multiple projection definitions are not allowed in this object. (line %d)",
11471147
"loadProjection()", msyylineno);
11481148
return(-1);

0 commit comments

Comments
 (0)