Module Name: src
Committed By: riastradh
Date: Wed Aug 31 12:17:14 UTC 2022
Modified Files:
src/lib/libc/stdlib: reallocarr.3
Log Message:
reallocarr(3): Bump date. Note overflow is handled internally.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/stdlib/reallocarr.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/stdlib/reallocarr.3
diff -u src/lib/libc/stdlib/reallocarr.3:1.5 src/lib/libc/stdlib/reallocarr.3:1.6
--- src/lib/libc/stdlib/reallocarr.3:1.5 Wed Aug 31 12:10:05 2022
+++ src/lib/libc/stdlib/reallocarr.3 Wed Aug 31 12:17:14 2022
@@ -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 @@ which will always succeed and unconditio
.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