Changeset 13226


Ignore:
Timestamp:
Feb 15, 2012, 1:44:21 AM (7 years ago)
Author:
jordan
Message:

(trunk libT) fix potential NULL pointer dereference in rpc-server.c's crude mime multipart parser

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rpc-server.c

    r12930 r13226  
    161161
    162162    const char * boundary_key = "boundary=";
    163     const char * boundary_key_begin = strstr( content_type, boundary_key );
     163    const char * boundary_key_begin = content_type ? strstr( content_type, boundary_key ) : NULL;
    164164    const char * boundary_val = boundary_key_begin ? boundary_key_begin + strlen( boundary_key ) : "arglebargle";
    165165    char * boundary = tr_strdup_printf( "--%s", boundary_val );
Note: See TracChangeset for help on using the changeset viewer.