Sebastian Lackner : server: Handle error when memdup fails in synthesize_formats.
Alexandre Julliard
julliard at winehq.org
Sat Oct 1 10:34:44 CDT 2016
Module: wine
Branch: master
Commit: b6b54fa14abe58d35e7d68afe2b8af5319c8983a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b6b54fa14abe58d35e7d68afe2b8af5319c8983a
Author: Sebastian Lackner <sebastian at 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 at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at 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;
More information about the wine-cvs
mailing list