Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/stdlib reallocarr(3): Bump date. Note overflow is ...
details: https://anonhg.NetBSD.org/src/rev/32bf2e30b2d5
branches: trunk
changeset: 369775:32bf2e30b2d5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Aug 31 12:17:14 2022 +0000
description:
reallocarr(3): Bump date. Note overflow is handled internally.
diffstat:
lib/libc/stdlib/reallocarr.3 | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diffs (39 lines):
diff -r 7a1e20ac6278 -r 32bf2e30b2d5 lib/libc/stdlib/reallocarr.3
--- a/lib/libc/stdlib/reallocarr.3 Wed Aug 31 12:10:05 2022 +0000
+++ b/lib/libc/stdlib/reallocarr.3 Wed Aug 31 12:17:14 2022 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: reallocarr.3,v 1.5 2022/08/31 12:10:05 riastradh Exp $
+.\" $NetBSD: reallocarr.3,v 1.6 2022/08/31 12:17:14 riastradh Exp $
.\"
.\" Copyright (c) 2015 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -26,7 +26,7 @@
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
-.Dd February 19, 2015
+.Dd August 31, 2022
.Dt REALLOCARR 3
.Os
.Sh NAME
@@ -100,6 +100,20 @@
.Fa ptr
to null.
.Pp
+Like
+.Xr calloc 3 ,
+.Nm
+fails gracefully if the product of
+.Fa number
+and
+.Fa size
+would overflow the representable size of memory.
+Unlike
+.Xr calloc 3 ,
+new memory allocated by
+.Nm
+is not zero-initialized.
+.Pp
The
.Nm
function may alter
Home |
Main Index |
Thread Index |
Old Index