You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/12/31 14:57:27 UTC
[GitHub] [incubator-nuttx-apps] normanr opened a new pull request #949: Fix some edge case bugs in nsh_parse
normanr opened a new pull request #949:
URL: https://github.com/apache/incubator-nuttx-apps/pull/949
## Summary
Fix some edge case bugs in nsh_parse (these cause serious errors):
- Handle nsh_filecat returning NULL on failure
- Background and redirect must be restored after an empty line
- Output redirection should be removed from argv like background
Remove trailing whitespace from commands as parameters (this is cosmetic). Technically the output should be reparsed, so that quoting can take effect, but this fixes the simple case of feeding the output of one command to another.
## Impact
nsh doesn't crash on edge cases and arguments do not have internal newlines
## Testing
Test cases for each bug:
```
echo `rm /tmp/tmp1.dat`
``
hostname > /tmp/x
echo -n `echo hello`
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #949: Fix some edge case bugs in nsh_parse
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #949:
URL: https://github.com/apache/incubator-nuttx-apps/pull/949
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org