# HG changeset patch # User asl # Date 1155311685 0 # Node ID fd2c3f3def9d8e926f17f1ffc84569739c0f7836 # Parent 0b2803660786f7190ffbeaa81d3b81143e34860c * src/monitor.c (cyg_monitor_network): Calling the network monitor html handler can trigger an exception when the function getifaddrs() fails because we are out of memory. Check the return code and return failure if this happens. diff --git a/packages/net/httpd/current/ChangeLog b/packages/net/httpd/current/ChangeLog --- a/packages/net/httpd/current/ChangeLog +++ b/packages/net/httpd/current/ChangeLog @@ -1,3 +1,10 @@ +2006-07-28 Jochen Gerster + + * src/monitor.c (cyg_monitor_network): Calling the network monitor + html handler can trigger an exception when the function + getifaddrs() fails because we are out of memory. Check the + return code and return failure if this happens. + 2005-07-30 Andrew Lunn * src/httpd.c (cyg_httpd_server): Use socklen_t to avoid compiler diff --git a/packages/net/httpd/current/src/monitor.c b/packages/net/httpd/current/src/monitor.c --- a/packages/net/httpd/current/src/monitor.c +++ b/packages/net/httpd/current/src/monitor.c @@ -702,7 +702,8 @@ static cyg_bool cyg_monitor_network( FIL { struct ifaddrs *iflist, *ifp; - getifaddrs(&iflist); + if(getifaddrs(&iflist)!=0) + return 0; html_begin(client);