14 Aug
2022
14 Aug
'22
3:29 p.m.
Nikolay Sivov (@nsivov) commented about dlls/mfplat/buffer.c:
CRITICAL_SECTION cs; };
-static void copy_image(const struct buffer *buffer, BYTE *dest, LONG dest_stride, const BYTE *src, - LONG src_stride, DWORD width, DWORD lines) +static HRESULT copy_image(const struct buffer *buffer, BYTE *dest, LONG dest_stride, const BYTE *src, + LONG src_stride, DWORD width, DWORD lines, DWORD dest_size) { MFCopyImage(dest, dest_stride, src, src_stride, width, lines);
+ if (width > abs(dest_stride) || abs(dest_stride) * lines > dest_size) + return E_NOT_SUFFICIENT_BUFFER; +
It would be valuable to test such error cases. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/546#note_6211