Skip to content

Commit b4cead2

Browse files
nirbheekjpakkane
authored andcommitted
find_program: Don't leak mutable array in get_command()
In several places in the gnome module, we are getting an array from this and directly appending to it which changes the original command array ever since we started caching the find_program results. We urgently need to move to immutable types for all object properties. Reported by Alexandor Larsson on IRC.
1 parent 7d71e9f commit b4cead2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mesonbuild/dependencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def found(self):
476476
return self.fullpath[0] is not None
477477

478478
def get_command(self):
479-
return self.fullpath
479+
return self.fullpath[:]
480480

481481
def get_name(self):
482482
return self.name

0 commit comments

Comments
 (0)