From d1cbfaa89eaf6b56ea7375c3d156036eef2d0b3e Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 7 Dec 2011 06:51:43 +0000 Subject: =?UTF-8?q?2011-12-07=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR 1983/networking * libnetworking/libc/gethostbyht.c (gethostent_r): Abort if (!hostf). --- cpukit/ChangeLog | 6 ++++++ cpukit/libnetworking/libc/gethostbyht.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'cpukit') diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 51e8f21539..f25da85d7f 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2011-12-07 Ralf Corsépius + + PR 1983/networking + * libnetworking/libc/gethostbyht.c (gethostent_r): + Abort if (!hostf). + 2011-11-30 Ralf Corsépius * librpc/src/rpc/clnt_udp.c (struct cu_data): diff --git a/cpukit/libnetworking/libc/gethostbyht.c b/cpukit/libnetworking/libc/gethostbyht.c index 4228b1c8c8..17723d707b 100644 --- a/cpukit/libnetworking/libc/gethostbyht.c +++ b/cpukit/libnetworking/libc/gethostbyht.c @@ -223,7 +223,7 @@ struct hostent* gethostent_r(char* buf, int len) int curlen; - if (hostf<0) return 0; + if (!hostf) return 0; fseek(hostf,0,SEEK_END); curlen=ftell(hostf); fseek(hostf,0,SEEK_SET); -- cgit v1.2.3