mailing list of musl libc
 help / color / mirror / code / Atom feed
2556c9171d5e1ac47e14557a9d2b4657c7899754 blob 209 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 
#define _BSD_SOURCE
#include <errno.h>
#include <stdlib.h>

void *reallocarray(void *ptr, size_t m, size_t n)
{
	if (n && m > (size_t)-1 / n) {
		errno = ENOMEM;
		return 0;
	}

	return realloc(ptr, m * n);
}
debug log:

solving 2556c917 ...
found 2556c917 in https://inbox.vuxu.org/musl/CA+XhMqy0tqvhNv35ZB9JV4FVfEMHE_gT8FeW_6An9Dv6khP7EQ@mail.gmail.com/
found 4a6ebe46 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 4a6ebe460469b69a6e860f6f1ad643c40c35fbeb	src/malloc/reallocarray.c

applying [1/1] https://inbox.vuxu.org/musl/CA+XhMqy0tqvhNv35ZB9JV4FVfEMHE_gT8FeW_6An9Dv6khP7EQ@mail.gmail.com/
diff --git a/src/malloc/reallocarray.c b/src/malloc/reallocarray.c
index 4a6ebe46..2556c917 100644

Checking patch src/malloc/reallocarray.c...
Applied patch src/malloc/reallocarray.c cleanly.

index at:
100644 2556c9171d5e1ac47e14557a9d2b4657c7899754	src/malloc/reallocarray.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).