Skip to content
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

Improve oslLoadImageFile function for better safety and extensibility #21

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

dogo
Copy link
Owner

@dogo dogo commented Aug 19, 2024

  • Adjusted the loop condition to use sizeof(extension) - 1 instead of -2, allowing the full extension to be copied while still ensuring space for a null terminator.
  • Initialized the extension buffer with zeros, removing the need for manual null termination after the loop.
  • Ensured the code handles edge cases such as the extension being at the start of the filename.

@dogo dogo merged commit 56df2b4 into master Aug 19, 2024
4 checks passed
@dogo dogo deleted the feature/improve-osl-load-Image-file branch August 19, 2024 14:44
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