Index: libcfa/src/stdlib.hfa
===================================================================
--- libcfa/src/stdlib.hfa	(revision 2b23d781b7a9f2fa92a7750bffc73cf9ec34e3c1)
+++ libcfa/src/stdlib.hfa	(revision f19fbbc504e33f9d4eec5177e4abb378bcecf2b7)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:12:35 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jul 20 19:04:33 2020
-// Update Count     : 472
+// Last Modified On : Tue Jul 21 07:58:05 2020
+// Update Count     : 475
 //
 
@@ -163,6 +163,6 @@
 	T * alloc_set( T ptr[], size_t dim, char fill ) {	// realloc array with fill
 		size_t osize = malloc_size( ptr );				// current allocation
-		T * nptr = realloc( ptr, dim * sizeof(T) );		// CFA realloc
-		size_t nsize = malloc_size( nptr );				// new allocation
+		size_t nsize = dim * sizeof(T);					// new allocation
+		T * nptr = realloc( ptr, nsize );				// CFA realloc
 		if ( nsize > osize ) {							// larger ?
 			memset( (char *)nptr + osize, (int)fill, nsize - osize ); // initialize added storage
@@ -172,7 +172,8 @@
 
 	T * alloc_set( T ptr[], size_t dim, T & fill ) {	// realloc array with fill
-		size_t odim = malloc_size( ptr ) / sizeof(T);	// current allocation
-		T * nptr = realloc( ptr, dim * sizeof(T) );		// CFA realloc
-		size_t ndim = malloc_size( nptr ) / sizeof(T);	// new allocation
+		size_t odim = malloc_size( ptr ) / sizeof(T);	// current dimension
+		size_t nsize = dim * sizeof(T);					// new allocation
+		size_t ndim = nsize / sizeof(T);				// new dimension
+		T * nptr = realloc( ptr, nsize );				// CFA realloc
 		if ( ndim > odim ) {							// larger ?
 			for ( i; odim ~ ndim ) {
@@ -230,6 +231,6 @@
 	T * alloc_align_set( T ptr[], size_t align, size_t dim, char fill ) {
 		size_t osize = malloc_size( ptr );				// current allocation
-		T * nptr = realloc( ptr, align, dim * sizeof(T) ); // CFA realloc
-		size_t nsize = malloc_size( nptr );				// new allocation
+		size_t nsize = dim * sizeof(T);					// new allocation
+		T * nptr = realloc( ptr, align, nsize );		// CFA realloc
 		if ( nsize > osize ) {							// larger ?
 			memset( (char *)nptr + osize, (int)fill, nsize - osize ); // initialize added storage
@@ -239,7 +240,8 @@
 
 	T * alloc_align_set( T ptr[], size_t align, size_t dim, T & fill ) {
-		size_t odim = malloc_size( ptr ) / sizeof(T);	// current allocation
-		T * nptr = realloc( ptr, align, dim * sizeof(T) ); // CFA realloc
-		size_t ndim = malloc_size( nptr );				// new allocation
+		size_t odim = malloc_size( ptr ) / sizeof(T);	// current dimension
+		size_t nsize = dim * sizeof(T);					// new allocation
+		size_t ndim = nsize / sizeof(T);				// new dimension
+		T * nptr = realloc( ptr, align, nsize );		// CFA realloc
 		if ( ndim > odim ) {							// larger ?
 			for ( i; odim ~ ndim ) {
