aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ptr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ptr.c b/ptr.c
index be3a4ae..74e3c69 100644
--- a/ptr.c
+++ b/ptr.c
@@ -188,6 +188,8 @@ ptr __ptrmcat __P4 (ptr,dst, char *,src, int,len, int,shrink)
newmax = limit_mem;
}
if ((p = (ptr)realloc((void *)dst, newmax + sizeofptr))) {
+ if (dst == NULL)
+ p->signature = PTR_SIG;
if (overlap)
src = ptrdata(p) + (src - ptrdata(dst));
if (!dst)
@@ -281,6 +283,8 @@ ptr __ptrmcpy __P4(ptr,dst, char *,src, int,len, int,shrink)
}
if ((p = (ptr)realloc((void *)dst, newmax + sizeofptr))) {
+ if (dst == NULL)
+ p->signature = PTR_SIG;
if (overlap)
src = ptrdata(p) + (src - ptrdata(dst));
if (!dst)