Fix truncation of ASEC ids

Change-Id: I1e6bfcc6b0a5be47e6fd19922fc81669f61b5dba
This commit is contained in:
Kenny Root 2012-04-27 15:33:58 -07:00
parent 344ca10856
commit 7b0bc85714

View file

@ -290,7 +290,7 @@ void CommandListener::AsecCmd::listAsecsInDirectory(SocketClient *cli, const cha
!strcmp(&dent->d_name[name_len - 5], ".asec")) {
char id[255];
memset(id, 0, sizeof(id));
strlcpy(id, dent->d_name, name_len - 5);
strlcpy(id, dent->d_name, name_len - 4);
cli->sendMsg(ResponseCode::AsecListResult, id, false);
}
}