-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unit-testing and general improvements. #29
Conversation
…nges to almost all files (i don't remember what I changed tbh), but I did finally unsterstand how strlcat works, and I also managed to get builtins working, will work on how they're called though in the future.
Signed-off-by: h4rl <98224660+h4rldev@users.noreply.github.com>
…gc flushing, implemented full testing for builtins, aswell as new builtins, such as pwd and cd.
…ite and finish test_cli
…ing, fixed some bugs with certain functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flawfinder (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
@Intancote. All I'm missing is the review, then I can focus on a better tokenizer and proper windows support (I just set up a windows vm for this purpose) |
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although some parts could be improved, these can be addressed later.
For now, this is a massive improvement over the current main branch. Further work will be done outside of the PR of course, and a 'functional' version for Windows will be added later on.
For now, this PR is approved 👍
All that needs to be done before the merge is for all checks too pass.
while (*ptr != '\0' && count < 4096 - 1) { | ||
size_t len = strlen(ptr); | ||
env_array[count] = malloc(len + 1); | ||
strlcpy(env_array[count], ptr, strlen(env_array[count]) + 1); |
Check notice
Code scanning / Flawfinder (reported by Codacy)
Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Note
…ng and writing in binary mode is unneeded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as my last review, but now all checks are good 👍
This pr has these TODOs before I'm comfortable with review: