Commit e342646
authored
strsep modifies its first argument, which means that if we don't make a
copy, any PATH processing that may occur after _CFProcessPath executes
breaks because strsep will effectively change PATH to be only the first
list item. For example, swiftpm's tool finding fails because it searches
PATH, and if the tool in question doesn't reside in the first PATH item,
things break.
This only occurs on BSD and only when the program name, i.e., argv[0], is
not an absolute path.
1 parent 265274a commit e342646
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
270 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
271 | 273 | | |
272 | | - | |
| 274 | + | |
273 | 275 | | |
274 | 276 | | |
275 | 277 | | |
| |||
283 | 285 | | |
284 | 286 | | |
285 | 287 | | |
| 288 | + | |
286 | 289 | | |
287 | 290 | | |
288 | 291 | | |
289 | 292 | | |
290 | 293 | | |
| 294 | + | |
291 | 295 | | |
292 | 296 | | |
293 | 297 | | |
| |||
0 commit comments