src/allocator.c

changeset 1040
1ecf4dbbc60c
parent 985
68754c7de906
--- a/src/allocator.c	Fri Dec 20 21:25:33 2024 +0100
+++ b/src/allocator.c	Sat Dec 21 21:03:28 2024 +0100
@@ -99,7 +99,7 @@
 ) {
     size_t n;
     if (cx_szmul(nmemb, size, &n)) {
-        errno = ENOMEM;
+        errno = EOVERFLOW;
         return 1;
     } else {
         void *nmem = realloc(*mem, n);
@@ -137,7 +137,7 @@
 ) {
     size_t n;
     if (cx_szmul(nmemb, size, &n)) {
-        errno = ENOMEM;
+        errno = EOVERFLOW;
         return NULL;
     } else {
         return allocator->cl->realloc(allocator->data, mem, n);

mercurial