win-capture: Fix buffer overrun in get_window_class

Detected by Coverity Scan (CID 12856)
This commit is contained in:
Richard Stanway
2015-10-12 21:49:32 +02:00
parent fc063444ca
commit 8f2460525f

View File

@@ -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);
}