=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/usbhidctl/usbhid.c,v retrieving revision 1.15 retrieving revision 1.16 diff -c -r1.15 -r1.16 *** src/usr.bin/usbhidctl/usbhid.c 2019/06/28 13:35:05 1.15 --- src/usr.bin/usbhidctl/usbhid.c 2021/02/04 06:57:19 1.16 *************** *** 1,4 **** ! /* $OpenBSD: usbhid.c,v 1.15 2019/06/28 13:35:05 deraadt Exp $ */ /* $NetBSD: usbhid.c,v 1.22 2002/02/20 20:30:42 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: usbhid.c,v 1.16 2021/02/04 06:57:19 anton Exp $ */ /* $NetBSD: usbhid.c,v 1.22 2002/02/20 20:30:42 christos Exp $ */ /* *************** *** 394,406 **** report->size = reptsize; if (report->size > 0) { ! /* ! * Allocate a buffer with enough space for the ! * report in the variable-sized data field. ! */ ! report->buffer = malloc(sizeof(*report->buffer) - ! sizeof(report->buffer->ucr_data) + ! report->size); if (report->buffer == NULL) err(1, NULL); } else --- 394,400 ---- report->size = reptsize; if (report->size > 0) { ! report->buffer = malloc(sizeof(*report->buffer)); if (report->buffer == NULL) err(1, NULL); } else