OpenColorIO
OpenColorIO copied to clipboard
EnvExpand infinite recursion
https://github.com/imageworks/OpenColorIO/blob/a557a85454ee1ffa8cb66f8a96238e079c452f08/src/core/PathUtils.cpp#L213
If an environment variable contains itself, the PathUtils.cpp EnvExpand function will recursively expand the string forever, e.g
$BLAH="aaa $BLAH bbb"
gets expanded to
aaa aaa $BLAH bbb bbb
then
aaa aaa aaa aaa $BLAH bbb bbb bbb bbb
and so on forever.
I would expect $BLAH would only get expanded once
This issue came up because we have the $SHOT context variable in the OCIOColorSpace Nuke node set to [getenv "SHOT"] - if this env var is undefined, the Tcl expression returns an error message of:
$SHOT: undefined environment variable