[exim-cvs] cvs commit: exim/exim-src/src host.c

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Nigel Metheringham
Ημερομηνία:  
Προς: exim-cvs
Αντικείμενο: [exim-cvs] cvs commit: exim/exim-src/src host.c
nm4 2007/10/18 13:01:00 BST

  Modified files:
    exim-src/src         host.c 
  Log:
  Defend against bad data from gethostbyaddr().  Fixes bug #619


  Revision  Changes    Path
  1.29      +1 -1      exim/exim-src/src/host.c


  Index: host.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/host.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- host.c    8 Jan 2007 10:50:18 -0000    1.28
  +++ host.c    18 Oct 2007 12:01:00 -0000    1.29
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/host.c,v 1.28 2007/01/08 10:50:18 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/host.c,v 1.29 2007/10/18 12:01:00 nm4 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -1502,7 +1502,7 @@
   treat this as non-existent. In some operating systems, this is returned as an
   empty string; in others as a single dot. */


  -if (hosts->h_name[0] == 0 || hosts->h_name[0] == '.')
  +if (hosts->h_name == NULL || hosts->h_name[0] == 0 || hosts->h_name[0] == '.')
     {
     HDEBUG(D_host_lookup) debug_printf("IP address lookup yielded an empty name: "
       "treated as non-existent host name\n");