Merge pull request #728 from liyansong2018/master
Fix Path Traversal #727 in Netplay server
This commit is contained in:
commit
3e1a8ec486
|
@ -811,11 +811,12 @@ void NetPlayServer::processClientRomLoadRequests(void)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
QString filepath = QDir::tempPath();
|
QString filepath = QDir::tempPath();
|
||||||
|
QFileInfo rompath = QFileInfo(client->romLoadData.fileName);
|
||||||
const char *romData = client->romLoadData.buf;
|
const char *romData = client->romLoadData.buf;
|
||||||
const size_t romSize = client->romLoadData.size;
|
const size_t romSize = client->romLoadData.size;
|
||||||
|
|
||||||
filepath.append( "/" );
|
filepath.append( "/" );
|
||||||
filepath.append( client->romLoadData.fileName );
|
filepath.append( rompath.fileName() );
|
||||||
|
|
||||||
//printf("Load ROM Request Received: %s\n", filepath.c_str());
|
//printf("Load ROM Request Received: %s\n", filepath.c_str());
|
||||||
//printf("Dumping Temp Rom to: %s\n", filepath.c_str());
|
//printf("Dumping Temp Rom to: %s\n", filepath.c_str());
|
||||||
|
|
Loading…
Reference in New Issue