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

fix: Resolve nullptr access issues #61

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

vishnu-khanth
Copy link
Contributor

  • Add nullptr check for returns form getenv to avoid sigsegv.
  • Passing char[] for putenv instead of string constant to avoid compilation warning.

Related-To: VLCLJ-2228

@vishnu-khanth
Copy link
Contributor Author

  1. Added nullptr check for returns form getenv to avoid sigsegv (this happens when ZES_ENABLE_SYSMAN doesn't exist in env variables).

  2. Passing char[] for putenv instead of string constant to avoid compilation warning.

Copy link
Contributor

@bellekal bellekal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you modify commit header something like "fix: Resolve nullptr access issues" ?
Also, Fix typo in commit message.

@vishnu-khanth vishnu-khanth changed the title Fix: SegFault & Warning in Env Variable Handling fix: Resolve nullptr access issues Jul 29, 2024
@vishnu-khanth
Copy link
Contributor Author

Can you modify commit header something like "fix: Resolve nullptr access issues" ? Also, Fix typo in commit message.

Updated it!

* Add nullptr check to avoid nullptr access.
* passing C style char array for putenv function instead of string constant to avoid
  compilation warning.

Related-To: VLCLJ-2228

Signed-off-by: Vishnu Khanth <vishnu.khanth.b@intel.com>
@bellekal bellekal merged commit a96c15c into oneapi-src:master Aug 1, 2024
11 checks passed
@vishnu-khanth vishnu-khanth deleted the compile_warning_fix branch August 1, 2024 04:41
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.

3 participants