diff options
| author | 2004-08-30 03:06:48 +0000 | |
|---|---|---|
| committer | 2004-08-30 03:06:48 +0000 | |
| commit | db8040f289837583f0888baa7ce6d0ee95e5ce15 (patch) | |
| tree | 5e3e0f8c79f0228c2cd9694212020938411a1af1 /sys/dev/usb/usb_subr.c | |
| parent | Forgot one MLINK; spotted by Dale. (diff) | |
| download | wireguard-openbsd-db8040f289837583f0888baa7ce6d0ee95e5ce15.tar.xz wireguard-openbsd-db8040f289837583f0888baa7ce6d0ee95e5ce15.zip | |
Remove 'usb_'realloc() usage because it doesn't know the size of the old
buffer, thus may copy too much, causing a memory fault.
ok millert, dlg, henning, tdeval, otto
Diffstat (limited to 'sys/dev/usb/usb_subr.c')
| -rw-r--r-- | sys/dev/usb/usb_subr.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 73b2ad0d103..2e6895ee421 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_subr.c,v 1.27 2004/07/08 22:18:45 deraadt Exp $ */ +/* $OpenBSD: usb_subr.c,v 1.28 2004/08/30 03:06:48 drahn Exp $ */ /* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ @@ -1383,17 +1383,3 @@ usb_disconnect_port(struct usbd_port *up, device_ptr_t parent) up->device = NULL; usb_free_device(dev); } - -#ifdef __OpenBSD__ -void *usb_realloc(void *p, u_int size, int pool, int flags) -{ - void *q; - - q = malloc(size, pool, flags); - if (q == NULL) - return (NULL); - bcopy(p, q, size); - free(p, pool); - return (q); -} -#endif |
