Changeset 5417:5ab92dd44ce2 for alias.c

Show
Ignore:
Timestamp:
2008-06-05 04:06:17 (6 months ago)
Author:
Vladimir Marek <Vladimir.Marek@…>
Branch:
HEAD
Message:

Wrap Fqdn in NONULL() to prevent crash with -d5 if Fqdn is NULL

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • alias.c

    r5375 r5417  
    567567int mutt_addr_is_user (ADDRESS *addr) 
    568568{ 
     569  const char *fqdn; 
     570 
    569571  /* NULL address is assumed to be the user. */ 
    570572  if (!addr) 
     
    589591    return 1; 
    590592  } 
    591   if (string_is_address(addr->mailbox, Username, mutt_fqdn(0))) 
    592   { 
    593     dprint (5, (debugfile, "mutt_addr_is_user: yes, %s = %s @ %s \n", addr->mailbox, Username, mutt_fqdn (0))); 
     593  fqdn = mutt_fqdn (0); 
     594  if (string_is_address(addr->mailbox, Username, fqdn)) 
     595  { 
     596    dprint (5, (debugfile, "mutt_addr_is_user: yes, %s = %s @ %s \n", addr->mailbox, Username, NONULL(fqdn))); 
    594597    return 1; 
    595598  } 
    596   if (string_is_address(addr->mailbox, Username, mutt_fqdn(1))) 
    597   { 
    598     dprint (5, (debugfile, "mutt_addr_is_user: yes, %s = %s @ %s \n", addr->mailbox, Username, mutt_fqdn (1))); 
     599  fqdn = mutt_fqdn (1); 
     600  if (string_is_address(addr->mailbox, Username, fqdn)) 
     601  { 
     602    dprint (5, (debugfile, "mutt_addr_is_user: yes, %s = %s @ %s \n", addr->mailbox, Username, NONULL(fqdn))); 
    599603    return 1; 
    600604  }