aboutsummaryrefslogtreecommitdiff
path: root/crypto/bio/bio_dump.c
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2025-07-11 00:18:38 +0000
committerEnji Cooper <ngie@FreeBSD.org>2025-07-11 00:18:38 +0000
commitecf8229ffeb17a05c78fab6b973b0cccb84e25c5 (patch)
treeda8cf5ccc84d9bc3fbadcf674c7d501f9ca7ab5d /crypto/bio/bio_dump.c
parent1c34280346af8284acdc0eae39496811d37df25d (diff)
Diffstat (limited to 'crypto/bio/bio_dump.c')
-rw-r--r--crypto/bio/bio_dump.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/bio/bio_dump.c b/crypto/bio/bio_dump.c
index c453da62688c..04191a653054 100644
--- a/crypto/bio/bio_dump.c
+++ b/crypto/bio/bio_dump.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -47,6 +47,8 @@ int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
for (i = 0; i < rows; i++) {
n = BIO_snprintf(buf, sizeof(buf), "%*s%04x - ", indent, "",
i * dump_width);
+ if (n < 0)
+ return -1;
for (j = 0; j < dump_width; j++) {
if (SPACE(buf, n, 3)) {
if (((i * dump_width) + j) >= len) {