[PATCH] libnetworking/gethostbyht.c: Bugfix for hostf validity test

Aun-Ali Zaidi admin at kodeit.net
Mon Dec 14 19:51:39 UTC 2015


closes #1709.
---
 cpukit/libnetworking/libc/gethostbyht.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libnetworking/libc/gethostbyht.c b/cpukit/libnetworking/libc/gethostbyht.c
index 17723d7..f31bdee 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) return 0;
+  if (hostf<=0) return 0;
   fseek(hostf,0,SEEK_END);
   curlen=ftell(hostf);
   fseek(hostf,0,SEEK_SET);
-- 
2.1.4


This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.                          



More information about the devel mailing list