MuhammedReza07 / dns_resolver

A simple DNS resolver in Rust written uisng standard library provided functionality.
1 stars 0 forks source link

Bound checking of NAME in DnsQuestion and DnsRecord #12

Closed MuhammedReza07 closed 1 year ago

MuhammedReza07 commented 1 year ago

Do complete bound checking before writing the string. Proposed solution: extract the conversion of the NAME from String to bytes into a separate function and improve error handling.

This would be necessary to avoid partial writes.

MuhammedReza07 commented 1 year ago

Bound checks removed by changes in parameters of write_from_slice, namely the addition of 'margin: Option'.

MuhammedReza07 commented 1 year ago

Closed issue.