Ignore:
Timestamp:
Nov 10, 2017 11:17:14 AM (7 years ago)
Author:
ming
Message:

Re #2059 (misc): Fixed potential buffer underflow when reading config file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_config.c

    r5461 r5691  
    268268        // Trim ending newlines 
    269269        len = strlen(line); 
    270         if (line[len-1]=='\n') 
     270        if (len > 0 && line[len-1]=='\n') 
    271271            line[--len] = '\0'; 
    272         if (line[len-1]=='\r') 
     272        if (len > 0 && line[len-1]=='\r') 
    273273            line[--len] = '\0'; 
    274274 
Note: See TracChangeset for help on using the changeset viewer.