Skip to content

Commit

Permalink
Bugfix: ESP IDF mDNS queries might return NULL query results
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Jul 30, 2023
1 parent aaf37bb commit cf0b85c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mdns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@ impl Drop for EspMdns {
}
}

fn copy_query_results(src: *const mdns_result_t, dst: &mut [QueryResult]) -> usize {
if let Some(src) = unsafe { src.as_ref() } {
fn copy_query_results(src: *mut mdns_result_t, dst: &mut [QueryResult]) -> usize {
if !src.is_null() {
let mut p = src;
let mut i = 0;
while !p.is_null() && i < dst.len() {
Expand Down

0 comments on commit cf0b85c

Please sign in to comment.