diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-29 20:06:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-29 20:06:20 +0000 |
commit | df22f44245a36c3fee84d98628b4a1f7cf83b956 (patch) | |
tree | d2ef6cd9abca930bba55060d5973c59aec47a5f5 /bin | |
parent | 23aaff83ce9d3c5f91779f14c09826a77a19ed38 (diff) |
overflow fix; michael@cs.mun.ca
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ksh/alloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ksh/alloc.c b/bin/ksh/alloc.c index de19068a73f..3c7b15fbe34 100644 --- a/bin/ksh/alloc.c +++ b/bin/ksh/alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: alloc.c,v 1.2 1998/06/25 19:01:43 millert Exp $ */ +/* $OpenBSD: alloc.c,v 1.3 1998/06/29 20:06:19 deraadt Exp $ */ /* * area-based allocation built on malloc/free @@ -390,7 +390,7 @@ aresize(ptr, size, ap) size_t s = (dp-1)->size * sizeof(Cell); if (s > size) s = size; - memcpy(ptr, dp, size); + memcpy(ptr, dp, s); afree((void *) dp, ap); } /* ACHECK() done in alloc()/afree() */ |