From 2fddd7109c39be65475ef0486dbc5188f69fb7f7 Mon Sep 17 00:00:00 2001 From: discomfitor Date: Mon, 1 Nov 2010 07:10:07 +0000 Subject: [PATCH] fix incorrect realloc usage git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@54073 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore_con/ecore_con.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c index 471245e..21d3949 100644 --- a/src/lib/ecore_con/ecore_con.c +++ b/src/lib/ecore_con/ecore_con.c @@ -2099,7 +2099,11 @@ _ecore_con_svr_cl_read(Ecore_Con_Client *cl) if (num > 0) { - inbuf = realloc(inbuf, inbuf_num + num); + unsigned char *tmp; + if (!(tmp = realloc(inbuf, inbuf_num + num))) + /* FIXME: this should probably do something */ + break; + inbuf = tmp; memcpy(inbuf + inbuf_num, buf, num); inbuf_num += num; continue; -- 2.7.4