From 8f2460525f6e98863f0d26b54b179ae5c2e7a8c2 Mon Sep 17 00:00:00 2001 From: Richard Stanway Date: Mon, 12 Oct 2015 21:49:32 +0200 Subject: [PATCH] win-capture: Fix buffer overrun in get_window_class Detected by Coverity Scan (CID 12856) --- plugins/win-capture/window-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/win-capture/window-helpers.c b/plugins/win-capture/window-helpers.c index 52a85a6e2..983e32400 100644 --- a/plugins/win-capture/window-helpers.c +++ b/plugins/win-capture/window-helpers.c @@ -124,7 +124,7 @@ static void get_window_class(struct dstr *class, HWND hwnd) wchar_t temp[256]; temp[0] = 0; - GetClassNameW(hwnd, temp, sizeof(temp)); + GetClassNameW(hwnd, temp, sizeof(temp) / sizeof(wchar_t)); dstr_from_wcs(class, temp); }