Sebastian Lackner : server: Handle error when memdup fails in synthesize_formats.
Module: wine Branch: master Commit: b6b54fa14abe58d35e7d68afe2b8af5319c8983a URL: http://source.winehq.org/git/wine.git/?a=commit;h=b6b54fa14abe58d35e7d68afe2... Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Fri Sep 30 03:41:38 2016 +0200 server: Handle error when memdup fails in synthesize_formats. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/clipboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/clipboard.c b/server/clipboard.c index d8b5f96..89ce835 100644 --- a/server/clipboard.c +++ b/server/clipboard.c @@ -206,7 +206,7 @@ static int synthesize_formats( struct clipboard *clipboard ) (HAS_FORMAT( map, CF_TEXT ) || HAS_FORMAT( map, CF_OEMTEXT ) || HAS_FORMAT( map, CF_UNICODETEXT ))) { void *data = memdup( &clipboard->lcid, sizeof(clipboard->lcid) ); - if ((format = add_format( clipboard, CF_LOCALE ))) + if (data && (format = add_format( clipboard, CF_LOCALE ))) { format->seqno = clipboard->seqno++; format->data = data;
participants (1)
-
Alexandre Julliard