summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-12-07 06:54:43 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-12-07 06:54:43 +0000
commit294039d87de22775260fbb3ab62d6c68195a8cf4 (patch)
treef6980c582ad80f8bf33b042bef9640693cffcae4
parent2011-11-28 Werner Almesberger <werner@almesberger.net> (diff)
downloadrtems-294039d87de22775260fbb3ab62d6c68195a8cf4.tar.bz2
2011-12-07 Ralf Corsépius <ralf.corsepius@rtems.org>
PR 1983/networking * libnetworking/libc/gethostbyht.c (gethostent_r): Abort if (!hostf).
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/libnetworking/libc/gethostbyht.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index b98c2904a5..cf2d5eafa6 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-07 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ PR 1983/networking
+ * libnetworking/libc/gethostbyht.c (gethostent_r):
+ Abort if (!hostf).
+
2011-11-28 Werner Almesberger <werner@almesberger.net>
PR 1961/cpukit
diff --git a/cpukit/libnetworking/libc/gethostbyht.c b/cpukit/libnetworking/libc/gethostbyht.c
index 65979b7f8a..02a056622c 100644
--- a/cpukit/libnetworking/libc/gethostbyht.c
+++ b/cpukit/libnetworking/libc/gethostbyht.c
@@ -220,7 +220,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);