Matteo Bruni : wpp: Manage malloc failure in pp_xstrdup.
Alexandre Julliard
julliard at winehq.org
Fri Oct 2 11:02:22 CDT 2009
Module: wine
Branch: master
Commit: 9b61ca1c0f59b0f968d5a7f69fa2ca95c11d49f0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9b61ca1c0f59b0f968d5a7f69fa2ca95c11d49f0
Author: Matteo Bruni <matteo.mystral at gmail.com>
Date: Mon Sep 28 20:42:48 2009 +0200
wpp: Manage malloc failure in pp_xstrdup.
---
libs/wpp/preproc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libs/wpp/preproc.c b/libs/wpp/preproc.c
index 2ebec83..c071c56 100644
--- a/libs/wpp/preproc.c
+++ b/libs/wpp/preproc.c
@@ -110,6 +110,8 @@ char *pp_xstrdup(const char *str)
assert(str != NULL);
len = strlen(str)+1;
s = pp_xmalloc(len);
+ if(!s)
+ return NULL;
return memcpy(s, str, len);
}
More information about the wine-cvs
mailing list