Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@stlankes
Copy link
Contributor

  • add functions to create DNS request

};

let name = unsafe { core::ffi::CStr::from_ptr(name) };
let name = name.to_str().expect("Bad encoding").to_owned();
Copy link
Member

Choose a reason for hiding this comment

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

Not sure, if returning an error in case of an error is the better approach. I can imagine a scenario, where this can be abused by user input to crash the application.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See last commit

/// };
///
/// // retake pointer to free memory
/// let _ = CString::from_raw(name);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// let _ = CString::from_raw(name);
/// drop(name);
/// println!("IP addr is {}", inaddr);

a missing feature is a miss-configuration => it is an error
@stlankes stlankes enabled auto-merge May 22, 2024 16:50
@stlankes stlankes added this pull request to the merge queue May 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 22, 2024
@stlankes stlankes added this pull request to the merge queue May 22, 2024
Merged via the queue into hermit-os:main with commit 7614614 May 22, 2024
@stlankes stlankes deleted the dns branch May 22, 2024 17:43
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