hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 55d0d59d33a8b6f0b699253f8a9efe553fe6ad65
parent dd6c17ed39b2edc9a54145240b867260fbc771d9
Author: Drew DeVault <sir@cmpwn.com>
Date:   Tue, 22 Jun 2021 13:54:23 -0400

net::dns: add note about error handling

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Mnet/dns/encode.ha | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/net/dns/encode.ha b/net/dns/encode.ha @@ -60,6 +60,7 @@ fn encode_u32(enc: *encoder, val: u32) (void | error) = { fn encode_labels(enc: *encoder, names: []str) (void | error) = { // TODO: Assert that the labels are all valid ASCII? for (let i = 0z; i < len(names); i += 1) { + // XXX: Should I return an error instead of asserting? assert(len(names[i]) < 256); if (len(enc.buf) <= enc.offs + 1 + len(names[i])) { return errors::overflow;