Merge pull request #2020 from rootvector2/identfile-bound-spoof-read

identfile: read original spoof with ReadFile
This commit is contained in:
Alexey Sokolov
2026-06-09 22:47:40 +01:00
committed by GitHub
2 changed files with 2 additions and 5 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ class CFile {
bool Open(const CString& sFileName, int iFlags = O_RDONLY,
mode_t iMode = 0644);
bool Open(int iFlags = O_RDONLY, mode_t iMode = 0644);
ssize_t Read(char* pszBuffer, int iBytes);
[[nodiscard]] ssize_t Read(char* pszBuffer, int iBytes);
bool ReadLine(CString& sData, const CString& sDelimiter = "\n");
bool ReadFile(CString& sData, size_t iMaxSize = 512 * 1024);
ssize_t Write(const char* pszBuffer, size_t iBytes);
+1 -4
View File
@@ -111,10 +111,7 @@ class CIdentFileModule : public CModule {
return false;
}
char buf[1024];
memset((char*)buf, 0, 1024);
m_pISpoofLockFile->Read(buf, 1024);
m_sOrigISpoof = buf;
m_pISpoofLockFile->ReadFile(m_sOrigISpoof);
if (!m_pISpoofLockFile->Seek(0) || !m_pISpoofLockFile->Truncate()) {
delete m_pISpoofLockFile;