Skip to content

Commit a41fdc0

Browse files
committed
modify:security code
1 parent 5b28232 commit a41fdc0

4 files changed

Lines changed: 3 additions & 14 deletions

File tree

.github/workflows/msbuild.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
configuration: [Debug ,Release]
2121
platform: [x86 ,x64 ,ARM64]
2222

23-
runs-on: windows-latest
23+
runs-on: windows-2025-vs2026
2424

2525
steps:
2626
- name: Checkout main repository code

XEngine_Source/XEngine_ModuleSession/ModuleSession_PullStream/ModuleSession_PullStream.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "pch.h"
22
#include "ModuleSession_PullStream.h"
3-
#include <new>
43
/********************************************************************
54
// Created: 2023/06/05 16:11:53
65
// File Name: D:\XEngine_StreamMedia\XEngine_Source\XEngine_ModuleSession\ModuleSession_PullStream\ModuleSession_PullStream.cpp

XEngine_Source/XEngine_ModuleSession/ModuleSession_PushStream/ModuleSession_PushStream.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "pch.h"
22
#include "ModuleSession_PushStream.h"
3-
#include <new>
43
/********************************************************************
54
// Created: 2023/06/04 20:19:13
65
// File Name: D:\XEngine_StreamMedia\XEngine_Source\XEngine_ModuleSession\ModuleSession_PushStream\ModuleSession_PushStream.cpp
@@ -556,18 +555,9 @@ bool CModuleSession_PushStream::ModuleSession_PushStream_HLSInsert(LPCXSTR lpszC
556555

557556
_tcsxcpy(stl_MapIterator->second->st_HLSFile.tszFileName, lpszTSFile);
558557
stl_MapIterator->second->st_HLSFile.xhToken = xhToken;
559-
int nFileHandle = _open(lpszTSFile, _O_WRONLY | _O_CREAT | _O_TRUNC, _S_IREAD | _S_IWRITE);
560-
if (nFileHandle < 0)
561-
{
562-
Session_IsErrorOccur = true;
563-
Session_dwErrorCode = ERROR_STREAMMEDIA_MODULE_SESSION_FILE;
564-
st_Locker.unlock_shared();
565-
return false;
566-
}
567-
stl_MapIterator->second->st_HLSFile.pSt_File = _fdopen(nFileHandle, "wb");
558+
stl_MapIterator->second->st_HLSFile.pSt_File = _xtfopen(lpszTSFile, _X("wb"));
568559
if (NULL == stl_MapIterator->second->st_HLSFile.pSt_File)
569560
{
570-
_close(nFileHandle);
571561
Session_IsErrorOccur = true;
572562
Session_dwErrorCode = ERROR_STREAMMEDIA_MODULE_SESSION_FILE;
573563
st_Locker.unlock_shared();
@@ -1126,7 +1116,6 @@ bool CModuleSession_PushStream::ModuleSession_PushStream_RTCIndexSet(LPCXSTR lps
11261116
Session_dwErrorCode = ERROR_STREAMMEDIA_MODULE_SESSION_PARAMENT;
11271117
return false;
11281118
}
1129-
bool bFound = false;
11301119
//是否存在
11311120
st_Locker.lock_shared();
11321121
unordered_map<xstring, PUSHSTREAM_PACKET*>::iterator stl_MapIterator = stl_MapPushStream.find(lpszClientUser);

XEngine_Source/XEngine_ModuleSession/pch.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <string>
2222
#include <memory>
2323
#include <mutex>
24+
#include <new>
2425
#include <unordered_map>
2526
#include <shared_mutex>
2627
using namespace std;

0 commit comments

Comments
 (0)