Ignore:
Timestamp:
Oct 24, 2016 3:22:46 AM (4 years ago)
Author:
nanang
Message:

Misc (re #1945): Avoid calling memchr() or memcpy() with NULL pointer (thanks Kal from the patch).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/string.h

    r4704 r5468  
    470470PJ_INLINE(char*) pj_strchr( const pj_str_t *str, int chr) 
    471471{ 
     472    if (str->slen == 0) 
     473        return NULL; 
    472474    return (char*) memchr((char*)str->ptr, chr, str->slen); 
    473475} 
Note: See TracChangeset for help on using the changeset viewer.