Skip to content

Add quotes to prevent potential word splittings#590

Open
zzmic wants to merge 1 commit intoRenderKit:masterfrom
zzmic:word-split-fix
Open

Add quotes to prevent potential word splittings#590
zzmic wants to merge 1 commit intoRenderKit:masterfrom
zzmic:word-split-fix

Conversation

@zzmic
Copy link

@zzmic zzmic commented Mar 9, 2026

As the title suggests, this PR includes the commit that adds quotes to several commands in scripts/download_gfx.sh to prevent potential word splittings (FYI, https://www.shellcheck.net/wiki/SC2086). In particular, the previous line of rm -rf /tmp/${GFX_DRIVER} is concerning, since ${GFX_DRIVER} is unquoted, (1) if it contains whitespaces, it would be split into multiple arguments to rm -rf, and (2) if it is empty or resolves unexpectedly, the command becomes rm -rf /tmp/, which is even more catastrophic. Other quotes are added more for the sake of consistency, even though they do address the valid concern of word splitting (but they are not as concerning as rm -rf /tmp/${GFX_DRIVER}).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant