diff --git a/channels/drive/client/drive_file.c b/channels/drive/client/drive_file.c index cac5682b0..69e520dca 100644 --- a/channels/drive/client/drive_file.c +++ b/channels/drive/client/drive_file.c @@ -587,6 +587,11 @@ BOOL drive_file_query_information(DRIVE_FILE* file, UINT32 FsInformationClass, w if (!file || !output) return FALSE; + if ((file->file_handle != INVALID_HANDLE_VALUE) && + GetFileInformationByHandle(file->file_handle, &fileInformation)) + return drive_file_query_from_handle_information(file, &fileInformation, FsInformationClass, + output); + hFile = CreateFileW(file->fullpath, 0, FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile != INVALID_HANDLE_VALUE) diff --git a/libfreerdp/codec/progressive.c b/libfreerdp/codec/progressive.c index e0b8e9ef1..c7ccf730f 100644 --- a/libfreerdp/codec/progressive.c +++ b/libfreerdp/codec/progressive.c @@ -2279,18 +2279,19 @@ static INLINE BOOL update_tiles(PROGRESSIVE_CONTEXT* WINPR_RESTRICT progressive, for (UINT32 j = 0; j < nbUpdateRects; j++) { + rc = FALSE; const RECTANGLE_16* rect = &updateRects[j]; if (rect->left < updateRect.left) - goto fail; + break; const UINT32 nXSrc = rect->left - updateRect.left; const UINT32 nYSrc = rect->top - updateRect.top; const UINT32 width = rect->right - rect->left; const UINT32 height = rect->bottom - rect->top; if (rect->left + width > surface->width) - goto fail; + break; if (rect->top + height > surface->height) - goto fail; + break; rc = freerdp_image_copy_no_overlap( pDstData, DstFormat, nDstStep, rect->left, rect->top, width, height, tile->data, progressive->format, tile->stride, nXSrc, nYSrc, NULL, FREERDP_KEEP_DST_ALPHA); @@ -2302,6 +2303,8 @@ static INLINE BOOL update_tiles(PROGRESSIVE_CONTEXT* WINPR_RESTRICT progressive, } region16_uninit(&updateRegion); + if (!rc) + goto fail; tile->dirty = FALSE; }