| Subject: | Re: memdup(3) |
|---|---|
| From: | Tobias Weingartner <weingart@xxxxxxxxx> |
| Date: | Mon, 14 Jul 2008 13:36:20 UTC |
| Newsgroups: | fa.openbsd.tech |
On Monday, July 14, Alexey Dobriyan wrote:
> +
> +void *
> +memdup(const void *src, size_t len)
> +{
> + void *dst;
> +
> + dst = malloc(len);
> + if (dst)
> + memcpy(dst, src, len);
So, the memcpy() will access things past the end of 'src' if I
"expand"? Stupid interface.
-Toby.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: poll: package-specs and version numbers, Nikolay Sturm |
|---|---|
| Next by Date: | Re: [PATCH] fix recent regression in acpibat(4), Marco Peereboom |
| Previous by Thread: | Re: memdup(3), Stuart Henderson |
| Next by Thread: | Re: memdup(3), Marc Balmer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |