From 0b97a7569cb62159c3e12d43fbee37aef88f6f52 Mon Sep 17 00:00:00 2001 From: Steve Markgraf Date: Wed, 18 Feb 2026 00:46:19 +0100 Subject: [PATCH] lib: fix stream 0 data allocation size --- src/libhsdaoh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libhsdaoh.c b/src/libhsdaoh.c index cdd74ae..4e08966 100644 --- a/src/libhsdaoh.c +++ b/src/libhsdaoh.c @@ -803,7 +803,7 @@ static void hsdaoh_process_frame(hsdaoh_dev_t *dev, uint8_t *data, int size) int frame_errors = 0; unsigned int stream0_payload_bytes = 0; uint16_t stream0_format = 0; - uint8_t *stream0_data = malloc(dev->width-1 * dev->height * 2); + uint8_t *stream0_data = malloc(dev->width * dev->height * sizeof(uint16_t)); if (!stream0_data) { fprintf(stderr, "Out of memory, frame skipped!\n");