Skip to content

Commit

Permalink
Gracefully handle edge case where clipboard format name is NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-André Moreau authored and akallabeth committed May 28, 2021
1 parent af08701 commit 1f1ce81
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions winpr/libwinpr/clipboard/clipboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ static wClipboardFormat* ClipboardFindFormat(wClipboard* clipboard, UINT32 forma
{
for (index = 0; index < clipboard->numFormats; index++)
{
if (!clipboard->formats[index].formatName)
continue;

if (strcmp(name, clipboard->formats[index].formatName) == 0)
{
format = &clipboard->formats[index];
Expand Down

0 comments on commit 1f1ce81

Please sign in to comment.