summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2022-06-07 17:53:42 +0000
committertb <>2022-06-07 17:53:42 +0000
commit6993bef05d69a71e22fe14ee6c148c74591b744b (patch)
tree4bb8431c980a803ddf920ae1139429649fcd3251 /src/lib
parentc4c129317518a60ab1f10c4642733f8241426098 (diff)
downloadopenbsd-6993bef05d69a71e22fe14ee6c148c74591b744b.tar.gz
openbsd-6993bef05d69a71e22fe14ee6c148c74591b744b.tar.bz2
openbsd-6993bef05d69a71e22fe14ee6c148c74591b744b.zip
Simplify another CBS_write_bytes() call in d2i_SSL_SESSION()
ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/ssl_asn1.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/libssl/ssl_asn1.c b/src/lib/libssl/ssl_asn1.c
index d5138115e5..6095a7370c 100644
--- a/src/lib/libssl/ssl_asn1.c
+++ b/src/lib/libssl/ssl_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_asn1.c,v 1.64 2022/06/07 17:45:13 tb Exp $ */ 1/* $OpenBSD: ssl_asn1.c,v 1.65 2022/06/07 17:53:42 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2016 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2016 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -348,11 +348,8 @@ d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp, long length)
348 goto err; 348 goto err;
349 if (present) { 349 if (present) {
350 if (!CBS_write_bytes(&session_id, (uint8_t *)&s->sid_ctx, 350 if (!CBS_write_bytes(&session_id, (uint8_t *)&s->sid_ctx,
351 sizeof(s->sid_ctx), &data_len)) 351 sizeof(s->sid_ctx), &s->sid_ctx_length))
352 goto err; 352 goto err;
353 if (data_len > UINT_MAX)
354 goto err;
355 s->sid_ctx_length = (unsigned int)data_len;
356 } 353 }
357 354
358 /* Verify result [5]. */ 355 /* Verify result [5]. */