1
0
mirror of https://github.com/coturn/coturn.git synced 2025-10-24 12:31:00 +02:00

Merge pull request #466 from chanduthedev/null-check

added null check for second char
This commit is contained in:
Mészáros Mihály 2020-02-12 08:02:15 +01:00 committed by GitHub
commit fbd79ed560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -786,7 +786,7 @@ void print_abs_file_name(const char *msg1, const char *msg2, const char *fn)
if(fn[0]=='/') { if(fn[0]=='/') {
STRCPY(absfn,fn); STRCPY(absfn,fn);
} else { } else {
if(fn[0]=='.' && fn[1]=='/') if(fn[0]=='.' && fn[1] && fn[1]=='/')
fn+=2; fn+=2;
if(!getcwd(absfn,sizeof(absfn)-1)) if(!getcwd(absfn,sizeof(absfn)-1))
absfn[0]=0; absfn[0]=0;