Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#17 cmdline_afp.c: 136: bad call to snprintf ?

open
nobody
5
2013-04-16
2013-04-16
dcb
No

Hello there,

For source code file cmdline_afp.c, around line 136 is the following source code

if (filename[0]!='/') {
if (strlen(curdir)==1)
snprintf(server_fullname,AFP_MAX_PATH,"/%s",filename);
else
snprintf(server_fullname,AFP_MAX_PATH,"%s/%s",curdir,filename);
} else {
snprintf(server_fullname,PATH_MAX,"%s",filename);
}

For the final call to snprintf, shouldn't PATH_MAX be replaced
by AFP_PATH_MAX to be consistent with the other two calls ?

Discussion