mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
Merge pull request #2020 from rootvector2/identfile-bound-spoof-read
identfile: read original spoof with ReadFile
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user