Changeset 11778


Ignore:
Timestamp:
Jan 27, 2011, 6:54:25 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) more NULL ptr safeguards

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/utils.c

    r11776 r11778  
    432432    }
    433433
    434     for( out = buf; *str; ++str )
     434    for( out = buf; str && *str; ++str )
    435435    {
    436436        *out++ = *str;
     
    451451    *out = '\0';
    452452
    453     return strcmp( buf, in ) ? buf : in;
     453    return !in || strcmp( buf, in ) ? buf : in;
    454454}
    455455
Note: See TracChangeset for help on using the changeset viewer.