]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
security: Round 6.3 shell command substitution fix (A18)
authorTulio A M Mendes <[email protected]>
Mon, 25 May 2026 19:21:33 +0000 (16:21 -0300)
committerTulio A M Mendes <[email protected]>
Mon, 25 May 2026 19:21:33 +0000 (16:21 -0300)
commit83ec1ca58e4188337e5d99546b26386b163285fa
tree44f35391db20be6b065bcc16dbd9a5f186a66623
parent640a322754e47c868504d41096ca1b86215c404b
security: Round 6.3 shell command substitution fix (A18)

A18: Fix shell command substitution  syntax
- expand_vars was adding '(' at the start but missing ')' at the end
- Added closing parenthesis to properly wrap subshell command
- Changed cmd[1 + cmdlen] = '\0' to cmd[1 + cmdlen] = ')' and cmd[2 + cmdlen] = '\0'

Tests: 119/119 PASS (smoke test, SMP=4)
user/cmds/sh/sh.c