From a14b829743f3276a736fc1958c12f64d2e52f936 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sat, 11 Sep 2021 18:16:54 +0000 Subject: [PATCH] fb: Fix buffer allocation Width and height got mixed up. --- src/fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fb.c b/src/fb.c index e80761c..fee7d43 100644 --- a/src/fb.c +++ b/src/fb.c @@ -41,7 +41,7 @@ struct nvnc_fb* nvnc_fb_new(uint16_t width, uint16_t height, fb->fourcc_format = fourcc_format; fb->stride = stride; - size_t size = width * stride * 4; /* Assume 4 byte format for now */ + size_t size = height * stride * 4; /* Assume 4 byte format for now */ size_t alignment = MAX(4, sizeof(void*)); size_t aligned_size = ALIGN_UP(size, alignment);