[PR #1909] [MERGED] Fix panics in ClientSubnet conversions #2685

Closed
opened 2026-03-16 11:02:45 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/1909
Author: @djc
Created: 3/20/2023
Status: Merged
Merged: 3/20/2023
Merged by: @bluejekyll

Base: mainHead: robust-opt


📝 Commits (4)

  • 5aacf71 proto: expand * imports
  • f185cd7 Use TryFrom instead of unwrapping for fallible conversions
  • 52eccd1 Upgrade to 2021 edition
  • 5d07bbc Remove unnecessary imports

📊 Changes

26 files changed (+46 additions, -62 deletions)

View changed files

📝 bin/Cargo.toml (+1 -1)
📝 crates/async-std-resolver/Cargo.toml (+1 -1)
📝 crates/client/Cargo.toml (+1 -1)
📝 crates/proto/Cargo.toml (+1 -1)
📝 crates/proto/src/https/https_client_stream.rs (+0 -1)
📝 crates/proto/src/op/op_code.rs (+0 -2)
📝 crates/proto/src/op/response_code.rs (+0 -2)
📝 crates/proto/src/quic/quic_stream.rs (+0 -2)
📝 crates/proto/src/rr/dns_class.rs (+1 -3)
📝 crates/proto/src/rr/dnssec/rdata/tsig.rs (+0 -1)
📝 crates/proto/src/rr/dnssec/supported_algorithm.rs (+1 -3)
📝 crates/proto/src/rr/rdata/opt.rs (+32 -24)
📝 crates/proto/src/rr/record_data.rs (+0 -2)
📝 crates/proto/src/rr/record_type.rs (+1 -5)
📝 crates/proto/src/rustls/tls_stream.rs (+0 -1)
📝 crates/proto/src/serialize/txt/rdata_parsers/soa.rs (+0 -1)
📝 crates/recursor/Cargo.toml (+1 -1)
📝 crates/resolver/Cargo.toml (+1 -1)
📝 crates/resolver/src/dns_lru.rs (+0 -1)
📝 crates/server/Cargo.toml (+1 -1)

...and 6 more files

📄 Description

#1906 (cc @mokeyish) introduced From conversions that called expect(), which caused errors in OSS-Fuzz. Replace these From impls with TryFrom instead, and upgrade to 2021 edition where TryFrom/TryInto became part of the prelude.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/1909 **Author:** [@djc](https://github.com/djc) **Created:** 3/20/2023 **Status:** ✅ Merged **Merged:** 3/20/2023 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `main` ← **Head:** `robust-opt` --- ### 📝 Commits (4) - [`5aacf71`](https://github.com/hickory-dns/hickory-dns/commit/5aacf714281456f4472d342ba59a98144ca2ea9e) proto: expand * imports - [`f185cd7`](https://github.com/hickory-dns/hickory-dns/commit/f185cd70ed80d17b5df2b2424b61862a33fb5849) Use TryFrom instead of unwrapping for fallible conversions - [`52eccd1`](https://github.com/hickory-dns/hickory-dns/commit/52eccd1beb3f00f2c995f0e28488029ea4cbdf37) Upgrade to 2021 edition - [`5d07bbc`](https://github.com/hickory-dns/hickory-dns/commit/5d07bbc7f2cf0882872074e3c13dbaf1703676d2) Remove unnecessary imports ### 📊 Changes **26 files changed** (+46 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `bin/Cargo.toml` (+1 -1) 📝 `crates/async-std-resolver/Cargo.toml` (+1 -1) 📝 `crates/client/Cargo.toml` (+1 -1) 📝 `crates/proto/Cargo.toml` (+1 -1) 📝 `crates/proto/src/https/https_client_stream.rs` (+0 -1) 📝 `crates/proto/src/op/op_code.rs` (+0 -2) 📝 `crates/proto/src/op/response_code.rs` (+0 -2) 📝 `crates/proto/src/quic/quic_stream.rs` (+0 -2) 📝 `crates/proto/src/rr/dns_class.rs` (+1 -3) 📝 `crates/proto/src/rr/dnssec/rdata/tsig.rs` (+0 -1) 📝 `crates/proto/src/rr/dnssec/supported_algorithm.rs` (+1 -3) 📝 `crates/proto/src/rr/rdata/opt.rs` (+32 -24) 📝 `crates/proto/src/rr/record_data.rs` (+0 -2) 📝 `crates/proto/src/rr/record_type.rs` (+1 -5) 📝 `crates/proto/src/rustls/tls_stream.rs` (+0 -1) 📝 `crates/proto/src/serialize/txt/rdata_parsers/soa.rs` (+0 -1) 📝 `crates/recursor/Cargo.toml` (+1 -1) 📝 `crates/resolver/Cargo.toml` (+1 -1) 📝 `crates/resolver/src/dns_lru.rs` (+0 -1) 📝 `crates/server/Cargo.toml` (+1 -1) _...and 6 more files_ </details> ### 📄 Description #1906 (cc @mokeyish) introduced `From` conversions that called `expect()`, which caused errors in OSS-Fuzz. Replace these `From` impls with `TryFrom` instead, and upgrade to 2021 edition where `TryFrom`/`TryInto` became part of the prelude. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:02:45 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#2685
No description provided.