idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
13,300
FileTransfer::RemoveInputFiles(const char *sandbox_path) { char *old_iwd; int old_transfer_flag; StringList do_not_remove; const char *f; if (!sandbox_path) { ASSERT(SpoolSpace); sandbox_path = SpoolSpace; } if ( !IsDirectory(sandbox_path) ) { return; } old_iwd = Iwd; old_transfer_flag = m_final_tran...
DoS Exec Code
0
FileTransfer::RemoveInputFiles(const char *sandbox_path) { char *old_iwd; int old_transfer_flag; StringList do_not_remove; const char *f; if (!sandbox_path) { ASSERT(SpoolSpace); sandbox_path = SpoolSpace; } if ( !IsDirectory(sandbox_path) ) { return; } old_iwd = Iwd; old_transfer_flag = m_final_tran...
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,301
FileTransfer::SaveTransferInfo(bool success,bool try_again,int hold_code,int hold_subcode,char const *hold_reason) { Info.success = success; Info.try_again = try_again; Info.hold_code = hold_code; Info.hold_subcode = hold_subcode; if( hold_reason ) { Info.error_desc = hold_reason; } }
DoS Exec Code
0
FileTransfer::SaveTransferInfo(bool success,bool try_again,int hold_code,int hold_subcode,char const *hold_reason) { Info.success = success; Info.try_again = try_again; Info.hold_code = hold_code; Info.hold_subcode = hold_subcode; if( hold_reason ) { Info.error_desc = hold_reason; } }
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,302
FileTransfer::SendTransferAck(Stream *s,bool success,bool try_again,int hold_code,int hold_subcode,char const *hold_reason) { SaveTransferInfo(success,try_again,hold_code,hold_subcode,hold_reason); if(!PeerDoesTransferAck) { dprintf(D_FULLDEBUG,"SendTransferAck: skipping transfer ack, because peer does not support...
DoS Exec Code
0
FileTransfer::SendTransferAck(Stream *s,bool success,bool try_again,int hold_code,int hold_subcode,char const *hold_reason) { SaveTransferInfo(success,try_again,hold_code,hold_subcode,hold_reason); if(!PeerDoesTransferAck) { dprintf(D_FULLDEBUG,"SendTransferAck: skipping transfer ack, because peer does not support...
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,303
FileTransfer::SimpleInit(ClassAd *Ad, bool want_check_perms, bool is_server, ReliSock *sock_to_use, priv_state priv, bool use_file_catalog, bool is_spool) { char buf[ATTRLIST_MAX_EXPRESSION]; char *dynamic_buf = NULL; jobAd = *Ad; // save job ad if( did_init ) { return 1; } user_supplied_key ...
DoS Exec Code
0
FileTransfer::SimpleInit(ClassAd *Ad, bool want_check_perms, bool is_server, ReliSock *sock_to_use, priv_state priv, bool use_file_catalog, bool is_spool) { char buf[ATTRLIST_MAX_EXPRESSION]; char *dynamic_buf = NULL; jobAd = *Ad; // save job ad if( did_init ) { return 1; } user_supplied_key ...
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,304
FileTransfer::UploadFiles(bool blocking, bool final_transfer) { ReliSock sock; ReliSock *sock_to_use; StringList changed_files(NULL,","); dprintf(D_FULLDEBUG, "entering FileTransfer::UploadFiles (final_transfer=%d)\n", final_transfer ? 1 : 0); if (ActiveTransferTid >= 0) { EXCEPT("FileTransfer::UpLoadF...
DoS Exec Code
0
FileTransfer::UploadFiles(bool blocking, bool final_transfer) { ReliSock sock; ReliSock *sock_to_use; StringList changed_files(NULL,","); dprintf(D_FULLDEBUG, "entering FileTransfer::UploadFiles (final_transfer=%d)\n", final_transfer ? 1 : 0); if (ActiveTransferTid >= 0) { EXCEPT("FileTransfer::UpLoadF...
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,305
FileTransfer::UploadThread(void *arg, Stream *s) { dprintf(D_FULLDEBUG,"entering FileTransfer::UploadThread\n"); FileTransfer * myobj = ((upload_info *)arg)->myobj; filesize_t total_bytes; int status = myobj->DoUpload( &total_bytes, (ReliSock *)s ); if(!myobj->WriteStatusToTransferPipe(total_bytes)) { return 0; ...
DoS Exec Code
0
FileTransfer::UploadThread(void *arg, Stream *s) { dprintf(D_FULLDEBUG,"entering FileTransfer::UploadThread\n"); FileTransfer * myobj = ((upload_info *)arg)->myobj; filesize_t total_bytes; int status = myobj->DoUpload( &total_bytes, (ReliSock *)s ); if(!myobj->WriteStatusToTransferPipe(total_bytes)) { return 0; ...
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,306
FileTransfer::addFileToExeptionList( const char* filename ) { if ( !ExceptionFiles ) { ExceptionFiles = new StringList; ASSERT ( NULL != ExceptionFiles ); } else if ( ExceptionFiles->file_contains ( filename ) ) { return true; } ExceptionFiles->append ( filename ); return true; }
DoS Exec Code
0
FileTransfer::addFileToExeptionList( const char* filename ) { if ( !ExceptionFiles ) { ExceptionFiles = new StringList; ASSERT ( NULL != ExceptionFiles ); } else if ( ExceptionFiles->file_contains ( filename ) ) { return true; } ExceptionFiles->append ( filename ); return true; }
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,307
FileTransfer::addOutputFile( const char* filename ) { if( ! OutputFiles ) { OutputFiles = new StringList; ASSERT(OutputFiles != NULL); } else if( OutputFiles->file_contains(filename) ) { return true; } OutputFiles->append( filename ); return true; }
DoS Exec Code
0
FileTransfer::addOutputFile( const char* filename ) { if( ! OutputFiles ) { OutputFiles = new StringList; ASSERT(OutputFiles != NULL); } else if( OutputFiles->file_contains(filename) ) { return true; } OutputFiles->append( filename ); return true; }
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,308
static unsigned int compute_filename_hash(const MyString &key) { return key.Hash(); }
DoS Exec Code
0
static unsigned int compute_filename_hash(const MyString &key) { return key.Hash(); }
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,309
static unsigned int compute_transthread_hash(const int &pid) { return (unsigned int)pid; }
DoS Exec Code
0
static unsigned int compute_transthread_hash(const int &pid) { return (unsigned int)pid; }
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,310
char const *destDir() { return dest_dir.c_str(); }
DoS Exec Code
0
char const *destDir() { return dest_dir.c_str(); }
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,311
FileTransfer::outputFileIsSpooled(char const *fname) { if(fname) { if( is_relative_to_cwd(fname) ) { if( Iwd && SpoolSpace && strcmp(Iwd,SpoolSpace)==0 ) { return true; } } else if( SpoolSpace && strncmp(fname,SpoolSpace,strlen(SpoolSpace))==0 ) { return true; } } return false; }
DoS Exec Code
0
FileTransfer::outputFileIsSpooled(char const *fname) { if(fname) { if( is_relative_to_cwd(fname) ) { if( Iwd && SpoolSpace && strcmp(Iwd,SpoolSpace)==0 ) { return true; } } else if( SpoolSpace && strncmp(fname,SpoolSpace,strlen(SpoolSpace))==0 ) { return true; } } return false; }
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,312
FileTransfer::setClientSocketTimeout(int timeout) { int old_val = clientSockTimeout; clientSockTimeout = timeout; return old_val; }
DoS Exec Code
0
FileTransfer::setClientSocketTimeout(int timeout) { int old_val = clientSockTimeout; clientSockTimeout = timeout; return old_val; }
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,313
FileTransfer::setPeerVersion( const char *peer_version ) { CondorVersionInfo vi( peer_version ); setPeerVersion( vi ); }
DoS Exec Code
0
FileTransfer::setPeerVersion( const char *peer_version ) { CondorVersionInfo vi( peer_version ); setPeerVersion( vi ); }
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,314
FileTransfer::setPeerVersion( const CondorVersionInfo &peer_version ) { if ( peer_version.built_since_version(6,7,7) ) { TransferFilePermissions = true; } else { TransferFilePermissions = false; } if ( peer_version.built_since_version(6,7,19) && param_boolean( "DELEGATE_JOB_GSI_CREDENTIALS", true ) ) { Del...
DoS Exec Code
0
FileTransfer::setPeerVersion( const CondorVersionInfo &peer_version ) { if ( peer_version.built_since_version(6,7,7) ) { TransferFilePermissions = true; } else { TransferFilePermissions = false; } if ( peer_version.built_since_version(6,7,19) && param_boolean( "DELEGATE_JOB_GSI_CREDENTIALS", true ) ) { Del...
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,315
void FileTransfer::setSecuritySession(char const *session_id) { free(m_sec_session_id); m_sec_session_id = NULL; m_sec_session_id = session_id ? strdup(session_id) : NULL; }
DoS Exec Code
0
void FileTransfer::setSecuritySession(char const *session_id) { free(m_sec_session_id); m_sec_session_id = NULL; m_sec_session_id = session_id ? strdup(session_id) : NULL; }
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,316
char const *srcName() { return src_name.c_str(); }
DoS Exec Code
0
char const *srcName() { return src_name.c_str(); }
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,317
FileTransfer::~FileTransfer() { if (daemonCore && ActiveTransferTid >= 0) { dprintf(D_ALWAYS, "FileTransfer object destructor called during " "active transfer. Cancelling transfer.\n"); daemonCore->Kill_Thread(ActiveTransferTid); TransThreadTable->remove(ActiveTransferTid); ActiveTransferTid = -1; } if ...
DoS Exec Code
0
FileTransfer::~FileTransfer() { if (daemonCore && ActiveTransferTid >= 0) { dprintf(D_ALWAYS, "FileTransfer object destructor called during " "active transfer. Cancelling transfer.\n"); daemonCore->Kill_Thread(ActiveTransferTid); TransThreadTable->remove(ActiveTransferTid); ActiveTransferTid = -1; } if ...
@@ -2716,7 +2716,7 @@ FileTransfer::DoUpload(filesize_t *total_bytes, ReliSock *s) } // condor_basename works for URLs - dest_filename.sprintf_cat( condor_basename(filename) ); + dest_filename.sprintf_cat( "%s", condor_basenam...
CWE-134
null
null
13,318
ReadUserLogState::BasePath( const ReadUserLog::FileState &state ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { return NULL; } return istate->m_base_path; }
DoS Exec Code
0
ReadUserLogState::BasePath( const ReadUserLog::FileState &state ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { return NULL; } return istate->m_base_path; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,319
ReadUserLogState::CheckFileStatus( int fd, bool &is_empty ) { StatWrapper sb; if ( fd >= 0 ) { (void) sb.Stat( fd ); } if ( m_cur_path.Length() && !sb.IsBufValid() ) { (void) sb.Stat( m_cur_path.Value() ); } if ( sb.GetRc() ) { dprintf( D_FULLDEBUG, "StatFile: errno = %d\n", sb.GetErrno() ); return Rea...
DoS Exec Code
0
ReadUserLogState::CheckFileStatus( int fd, bool &is_empty ) { StatWrapper sb; if ( fd >= 0 ) { (void) sb.Stat( fd ); } if ( m_cur_path.Length() && !sb.IsBufValid() ) { (void) sb.Stat( m_cur_path.Value() ); } if ( sb.GetRc() ) { dprintf( D_FULLDEBUG, "StatFile: errno = %d\n", sb.GetErrno() ); return Rea...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,320
ReadUserLogState::EventNum( const ReadUserLog::FileState &state ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { return -1; } return (filesize_t) istate->m_event_num.asint; }
DoS Exec Code
0
ReadUserLogState::EventNum( const ReadUserLog::FileState &state ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { return -1; } return (filesize_t) istate->m_event_num.asint; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,321
ReadUserLogState::GeneratePath( int rotation, MyString &path, bool initializing ) const { if ( !initializing && !m_initialized ) { return false; } if ( ( rotation < 0 ) || ( rotation > m_max_rotations ) ) { return false; } if ( !m_base_path.Length() ) { path = ""; return false; } pat...
DoS Exec Code
0
ReadUserLogState::GeneratePath( int rotation, MyString &path, bool initializing ) const { if ( !initializing && !m_initialized ) { return false; } if ( ( rotation < 0 ) || ( rotation > m_max_rotations ) ) { return false; } if ( !m_base_path.Length() ) { path = ""; return false; } pat...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,322
ReadUserLogState::GetStateString( MyString &str, const char *label ) const { str = ""; if ( NULL != label ) { str.sprintf( "%s:\n", label ); } str.sprintf_cat ( " BasePath = %s\n" " CurPath = %s\n" " UniqId = %s, seq = %d\n" " rotation = %d; max = %d; offset = %ld; event = %ld; type = %d\n" " inode...
DoS Exec Code
0
ReadUserLogState::GetStateString( MyString &str, const char *label ) const { str = ""; if ( NULL != label ) { str.sprintf( "%s:\n", label ); } str.sprintf_cat ( " BasePath = %s\n" " CurPath = %s\n" " UniqId = %s, seq = %d\n" " rotation = %d; max = %d; offset = %ld; event = %ld; type = %d\n" " inode...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,323
ReadUserLogState::GetStateString( const ReadUserLog::FileState &state, MyString &str, const char *label ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { if ( label ) { str.sprintf( "%s: no state", label ); } else { ...
DoS Exec Code
0
ReadUserLogState::GetStateString( const ReadUserLog::FileState &state, MyString &str, const char *label ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { if ( label ) { str.sprintf( "%s: no state", label ); } else { ...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,324
ReadUserLogFileState::InitState( ReadUserLog::FileState &state ) { state.buf = (void *) new ReadUserLogState::FileStatePub; state.size = sizeof( ReadUserLogState::FileStatePub ); ReadUserLogFileState::FileState *istate; if ( !convertState(state, istate) ) { return false; } memset( istate, 0, sizeof(ReadUser...
DoS Exec Code
0
ReadUserLogFileState::InitState( ReadUserLog::FileState &state ) { state.buf = (void *) new ReadUserLogState::FileStatePub; state.size = sizeof( ReadUserLogState::FileStatePub ); ReadUserLogFileState::FileState *istate; if ( !convertState(state, istate) ) { return false; } memset( istate, 0, sizeof(ReadUser...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,325
ReadUserLogState::LogPosition( const ReadUserLog::FileState &state ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { return -1; } return (filesize_t) istate->m_log_position.asint; }
DoS Exec Code
0
ReadUserLogState::LogPosition( const ReadUserLog::FileState &state ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { return -1; } return (filesize_t) istate->m_log_position.asint; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,326
ReadUserLogState::LogRecordNo( const ReadUserLog::FileState &state ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { return -1; } return (filesize_t) istate->m_log_record.asint; }
DoS Exec Code
0
ReadUserLogState::LogRecordNo( const ReadUserLog::FileState &state ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { return -1; } return (filesize_t) istate->m_log_record.asint; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,327
ReadUserLogState::Offset( const ReadUserLog::FileState &state ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { return -1; } return (filesize_t) istate->m_offset.asint; }
DoS Exec Code
0
ReadUserLogState::Offset( const ReadUserLog::FileState &state ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { return -1; } return (filesize_t) istate->m_offset.asint; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,328
ReadUserLogFileState::ReadUserLogFileState( void ) { m_rw_state = NULL; m_ro_state = NULL; }
DoS Exec Code
0
ReadUserLogFileState::ReadUserLogFileState( void ) { m_rw_state = NULL; m_ro_state = NULL; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,329
ReadUserLogFileState::ReadUserLogFileState( ReadUserLog::FileState &state ) { convertState( state, m_rw_state ); m_ro_state = m_rw_state; }
DoS Exec Code
0
ReadUserLogFileState::ReadUserLogFileState( ReadUserLog::FileState &state ) { convertState( state, m_rw_state ); m_ro_state = m_rw_state; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,330
ReadUserLogFileState::ReadUserLogFileState( const ReadUserLog::FileState &state ) { m_rw_state = NULL; convertState( state, m_ro_state ); }
DoS Exec Code
0
ReadUserLogFileState::ReadUserLogFileState( const ReadUserLog::FileState &state ) { m_rw_state = NULL; convertState( state, m_ro_state ); }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,331
ReadUserLogState::ReadUserLogState( const char *path, int max_rotations, int recent_thresh ) : ReadUserLogFileState( ) { Reset( RESET_INIT ); m_max_rotations = max_rotations; m_recent_thresh = recent_thresh; if ( path ) { m_base_path = path; } m_initialized = true; m_update_time = 0; }
DoS Exec Code
0
ReadUserLogState::ReadUserLogState( const char *path, int max_rotations, int recent_thresh ) : ReadUserLogFileState( ) { Reset( RESET_INIT ); m_max_rotations = max_rotations; m_recent_thresh = recent_thresh; if ( path ) { m_base_path = path; } m_initialized = true; m_update_time = 0; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,332
ReadUserLogState::ReadUserLogState( const ReadUserLog::FileState &state, int recent_thresh ) : ReadUserLogFileState( state ) { Reset( RESET_INIT ); m_recent_thresh = recent_thresh; if ( !SetState( state ) ) { dprintf( D_FULLDEBUG, "::ReadUserLogState: failed to set state from buffer\n" ); m_init_erro...
DoS Exec Code
0
ReadUserLogState::ReadUserLogState( const ReadUserLog::FileState &state, int recent_thresh ) : ReadUserLogFileState( state ) { Reset( RESET_INIT ); m_recent_thresh = recent_thresh; if ( !SetState( state ) ) { dprintf( D_FULLDEBUG, "::ReadUserLogState: failed to set state from buffer\n" ); m_init_erro...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,333
ReadUserLogState::ReadUserLogState( void ) : ReadUserLogFileState( ) { m_update_time = 0; Reset( RESET_INIT ); }
DoS Exec Code
0
ReadUserLogState::ReadUserLogState( void ) : ReadUserLogFileState( ) { m_update_time = 0; Reset( RESET_INIT ); }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,334
ReadUserLogStateAccess::ReadUserLogStateAccess( const ReadUserLog::FileState &state) { m_state = new ReadUserLogFileState(state); }
DoS Exec Code
0
ReadUserLogStateAccess::ReadUserLogStateAccess( const ReadUserLog::FileState &state) { m_state = new ReadUserLogFileState(state); }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,335
ReadUserLogState::Reset( ResetType type ) { if ( RESET_INIT == type ) { m_initialized = false; m_init_error = false; m_base_path = ""; m_max_rotations = 0; m_recent_thresh = 0; m_score_fact_ctime = 0; m_score_fact_inode = 0; m_score_fact_same_size = 0; m_score_fact_grown = 0; m_score_fact_shrunk =...
DoS Exec Code
0
ReadUserLogState::Reset( ResetType type ) { if ( RESET_INIT == type ) { m_initialized = false; m_init_error = false; m_base_path = ""; m_max_rotations = 0; m_recent_thresh = 0; m_score_fact_ctime = 0; m_score_fact_inode = 0; m_score_fact_same_size = 0; m_score_fact_grown = 0; m_score_fact_shrunk =...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,336
ReadUserLogState::Rotation( int rotation, StatStructType &statbuf, bool initializing ) { if ( !initializing && !m_initialized ) { return -1; } if ( ( rotation < 0 ) || ( rotation > m_max_rotations ) ) { return -1; } if ( m_cur_rot == rotation ) { return 0; } m_uniq_id = ""; GeneratePath...
DoS Exec Code
0
ReadUserLogState::Rotation( int rotation, StatStructType &statbuf, bool initializing ) { if ( !initializing && !m_initialized ) { return -1; } if ( ( rotation < 0 ) || ( rotation > m_max_rotations ) ) { return -1; } if ( m_cur_rot == rotation ) { return 0; } m_uniq_id = ""; GeneratePath...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,337
ReadUserLogState::Rotation( const ReadUserLog::FileState &state ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { return -1; } return istate->m_rotation; }
DoS Exec Code
0
ReadUserLogState::Rotation( const ReadUserLog::FileState &state ) const { const ReadUserLogFileState::FileState *istate; if ( ( !convertState(state, istate) ) || ( !istate->m_version ) ) { return -1; } return istate->m_rotation; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,338
ReadUserLogState::ScoreFile( int rot ) const { if ( rot > m_max_rotations ) { return -1; } else if ( rot < 0 ) { rot = m_cur_rot; } MyString path; if ( !GeneratePath( rot, path ) ) { return -1; } return ScoreFile( path.Value(), rot ); }
DoS Exec Code
0
ReadUserLogState::ScoreFile( int rot ) const { if ( rot > m_max_rotations ) { return -1; } else if ( rot < 0 ) { rot = m_cur_rot; } MyString path; if ( !GeneratePath( rot, path ) ) { return -1; } return ScoreFile( path.Value(), rot ); }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,339
ReadUserLogState::ScoreFile( const char *path, int rot ) const { StatStructType statbuf; if ( NULL == path ) { path = CurPath( ); } if ( rot < 0 ) { rot = m_cur_rot; } if ( StatFile( path, statbuf ) ) { dprintf( D_FULLDEBUG, "ScoreFile: stat Error\n" ); return -1; } return ScoreFile( statbuf, rot ); }...
DoS Exec Code
0
ReadUserLogState::ScoreFile( const char *path, int rot ) const { StatStructType statbuf; if ( NULL == path ) { path = CurPath( ); } if ( rot < 0 ) { rot = m_cur_rot; } if ( StatFile( path, statbuf ) ) { dprintf( D_FULLDEBUG, "ScoreFile: stat Error\n" ); return -1; } return ScoreFile( statbuf, rot ); }...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,340
ReadUserLogState::ScoreFile( const StatStructType &statbuf, int rot ) const { int score = 0; if ( rot < 0 ) { rot = m_cur_rot; } bool is_recent = ( time(NULL) < (m_update_time + m_recent_thresh) ); bool is_current = ( rot == m_cur_rot ); bool same_size = ( statbuf.st_size == m_stat_buf.st_size ); bool has_...
DoS Exec Code
0
ReadUserLogState::ScoreFile( const StatStructType &statbuf, int rot ) const { int score = 0; if ( rot < 0 ) { rot = m_cur_rot; } bool is_recent = ( time(NULL) < (m_update_time + m_recent_thresh) ); bool is_current = ( rot == m_cur_rot ); bool same_size = ( statbuf.st_size == m_stat_buf.st_size ); bool has_...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,341
ReadUserLogState::SetScoreFactor( enum ScoreFactors which, int factor ) { switch ( which ) { case SCORE_CTIME: m_score_fact_ctime = factor; break; case SCORE_INODE: m_score_fact_inode = factor; break; case SCORE_SAME_SIZE: m_score_fact_same_size = factor; break; case SCORE_GROWN: m_score_fact_grown ...
DoS Exec Code
0
ReadUserLogState::SetScoreFactor( enum ScoreFactors which, int factor ) { switch ( which ) { case SCORE_CTIME: m_score_fact_ctime = factor; break; case SCORE_INODE: m_score_fact_inode = factor; break; case SCORE_SAME_SIZE: m_score_fact_same_size = factor; break; case SCORE_GROWN: m_score_fact_grown ...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,342
ReadUserLogState::StatFile( void ) { int status = StatFile( CurPath(), m_stat_buf ); if ( 0 == status ) { m_stat_time = time( NULL ); m_stat_valid = true; Update(); } return status; }
DoS Exec Code
0
ReadUserLogState::StatFile( void ) { int status = StatFile( CurPath(), m_stat_buf ); if ( 0 == status ) { m_stat_time = time( NULL ); m_stat_valid = true; Update(); } return status; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,343
ReadUserLogState::StatFile( StatStructType &statbuf ) const { return StatFile( CurPath(), statbuf ); }
DoS Exec Code
0
ReadUserLogState::StatFile( StatStructType &statbuf ) const { return StatFile( CurPath(), statbuf ); }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,344
ReadUserLogState::StatFile( const char *path, StatStructType &statbuf ) const { StatWrapper statwrap; if ( statwrap.Stat( path, StatWrapper::STATOP_STAT ) ) { return statwrap.GetRc( ); } statwrap.GetBuf( statbuf ); return 0; }
DoS Exec Code
0
ReadUserLogState::StatFile( const char *path, StatStructType &statbuf ) const { StatWrapper statwrap; if ( statwrap.Stat( path, StatWrapper::STATOP_STAT ) ) { return statwrap.GetRc( ); } statwrap.GetBuf( statbuf ); return 0; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,345
ReadUserLogState::StatFile( int fd ) { StatWrapper statwrap; if ( statwrap.Stat( fd ) ) { dprintf( D_FULLDEBUG, "StatFile: errno = %d\n", statwrap.GetErrno() ); return statwrap.GetRc( ); } statwrap.GetBuf( m_stat_buf ); m_stat_time = time( NULL ); m_stat_valid = true; Update(); return 0; }
DoS Exec Code
0
ReadUserLogState::StatFile( int fd ) { StatWrapper statwrap; if ( statwrap.Stat( fd ) ) { dprintf( D_FULLDEBUG, "StatFile: errno = %d\n", statwrap.GetErrno() ); return statwrap.GetRc( ); } statwrap.GetBuf( m_stat_buf ); m_stat_time = time( NULL ); m_stat_valid = true; Update(); return 0; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,346
ReadUserLogFileState::UninitState( ReadUserLog::FileState &state ) { ReadUserLogState::FileStatePub *istate = (ReadUserLogState::FileStatePub *) state.buf; delete istate; state.buf = NULL; state.size = 0; return true; }
DoS Exec Code
0
ReadUserLogFileState::UninitState( ReadUserLog::FileState &state ) { ReadUserLogState::FileStatePub *istate = (ReadUserLogState::FileStatePub *) state.buf; delete istate; state.buf = NULL; state.size = 0; return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,347
ReadUserLogFileState::convertState( const ReadUserLog::FileState &state, const ReadUserLogFileState::FileStatePub *&pub ) { pub = (const ReadUserLogFileState::FileStatePub *) state.buf; return true; }
DoS Exec Code
0
ReadUserLogFileState::convertState( const ReadUserLog::FileState &state, const ReadUserLogFileState::FileStatePub *&pub ) { pub = (const ReadUserLogFileState::FileStatePub *) state.buf; return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,348
ReadUserLogFileState::convertState( ReadUserLog::FileState &state, ReadUserLogFileState::FileState *&internal ) { ReadUserLogFileState::FileStatePub *pub; convertState(state, pub); internal = &(pub->internal); return true; }
DoS Exec Code
0
ReadUserLogFileState::convertState( ReadUserLog::FileState &state, ReadUserLogFileState::FileState *&internal ) { ReadUserLogFileState::FileStatePub *pub; convertState(state, pub); internal = &(pub->internal); return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,349
ReadUserLogStateAccess::getEventNumber( unsigned long &event_no ) const { int64_t my_event_no; if ( !m_state->getLogRecordNo(my_event_no) ) { return false; } if ( (unsigned long)my_event_no > ULONG_MAX ) { return false; } event_no = (unsigned long) my_event_no; return true; }
DoS Exec Code
0
ReadUserLogStateAccess::getEventNumber( unsigned long &event_no ) const { int64_t my_event_no; if ( !m_state->getLogRecordNo(my_event_no) ) { return false; } if ( (unsigned long)my_event_no > ULONG_MAX ) { return false; } event_no = (unsigned long) my_event_no; return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,350
ReadUserLogFileState::getFileEventNum( int64_t &num ) const { if ( NULL == m_ro_state ) { return false; } num = m_ro_state->internal.m_event_num.asint; return true; }
DoS Exec Code
0
ReadUserLogFileState::getFileEventNum( int64_t &num ) const { if ( NULL == m_ro_state ) { return false; } num = m_ro_state->internal.m_event_num.asint; return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,351
ReadUserLogStateAccess::getFileEventNum( unsigned long &num ) const { int64_t my_num; if ( !m_state->getFileEventNum(my_num) ) { return false; } if ( (unsigned long)my_num > ULONG_MAX ) { return false; } num = (unsigned long) my_num; return true; }
DoS Exec Code
0
ReadUserLogStateAccess::getFileEventNum( unsigned long &num ) const { int64_t my_num; if ( !m_state->getFileEventNum(my_num) ) { return false; } if ( (unsigned long)my_num > ULONG_MAX ) { return false; } num = (unsigned long) my_num; return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,352
ReadUserLogStateAccess::getFileEventNumDiff( const ReadUserLogStateAccess &other, long &diff ) const { const ReadUserLogFileState *ostate; if ( !other.getState( ostate ) ) { return false; } int64_t my_num, other_num; if ( !m_state->getFileEventNum(my_num) || ! ostate->getFileEventNum(other_num) ) { ...
DoS Exec Code
0
ReadUserLogStateAccess::getFileEventNumDiff( const ReadUserLogStateAccess &other, long &diff ) const { const ReadUserLogFileState *ostate; if ( !other.getState( ostate ) ) { return false; } int64_t my_num, other_num; if ( !m_state->getFileEventNum(my_num) || ! ostate->getFileEventNum(other_num) ) { ...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,353
ReadUserLogFileState::getFileOffset( int64_t &pos ) const { if ( NULL == m_ro_state ) { return false; } pos = m_ro_state->internal.m_offset.asint; return true; }
DoS Exec Code
0
ReadUserLogFileState::getFileOffset( int64_t &pos ) const { if ( NULL == m_ro_state ) { return false; } pos = m_ro_state->internal.m_offset.asint; return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,354
ReadUserLogStateAccess::getFileOffset( unsigned long &pos ) const { int64_t my_pos; if ( !m_state->getFileOffset(my_pos) ) { return false; } if ( my_pos > LONG_MAX ) { return false; } pos = (unsigned long) my_pos; return true; }
DoS Exec Code
0
ReadUserLogStateAccess::getFileOffset( unsigned long &pos ) const { int64_t my_pos; if ( !m_state->getFileOffset(my_pos) ) { return false; } if ( my_pos > LONG_MAX ) { return false; } pos = (unsigned long) my_pos; return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,355
ReadUserLogStateAccess::getFileOffsetDiff( const ReadUserLogStateAccess &other, long &diff ) const { const ReadUserLogFileState *ostate; if ( !other.getState( ostate ) ) { return false; } int64_t my_pos, other_pos; if ( !m_state->getFileOffset(my_pos) || ! ostate->getFileOffset(other_pos) ) { return...
DoS Exec Code
0
ReadUserLogStateAccess::getFileOffsetDiff( const ReadUserLogStateAccess &other, long &diff ) const { const ReadUserLogFileState *ostate; if ( !other.getState( ostate ) ) { return false; } int64_t my_pos, other_pos; if ( !m_state->getFileOffset(my_pos) || ! ostate->getFileOffset(other_pos) ) { return...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,356
ReadUserLogFileState::getLogPosition( int64_t &pos ) const { if ( NULL == m_ro_state ) { return false; } pos = m_ro_state->internal.m_log_position.asint; return true; }
DoS Exec Code
0
ReadUserLogFileState::getLogPosition( int64_t &pos ) const { if ( NULL == m_ro_state ) { return false; } pos = m_ro_state->internal.m_log_position.asint; return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,357
ReadUserLogStateAccess::getLogPositionDiff( const ReadUserLogStateAccess &other, long &diff ) const { const ReadUserLogFileState *ostate; if ( !other.getState( ostate ) ) { return false; } int64_t my_pos, other_pos; if ( !m_state->getLogPosition(my_pos) || ! ostate->getLogPosition(other_pos) ) { ret...
DoS Exec Code
0
ReadUserLogStateAccess::getLogPositionDiff( const ReadUserLogStateAccess &other, long &diff ) const { const ReadUserLogFileState *ostate; if ( !other.getState( ostate ) ) { return false; } int64_t my_pos, other_pos; if ( !m_state->getLogPosition(my_pos) || ! ostate->getLogPosition(other_pos) ) { ret...
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,358
ReadUserLogFileState::getLogRecordNo( int64_t &recno ) const { if ( NULL == m_ro_state ) { return false; } recno = m_ro_state->internal.m_log_record.asint; return true; }
DoS Exec Code
0
ReadUserLogFileState::getLogRecordNo( int64_t &recno ) const { if ( NULL == m_ro_state ) { return false; } recno = m_ro_state->internal.m_log_record.asint; return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,359
ReadUserLogFileState::getSequenceNo( int &seqno ) const { if ( NULL == m_ro_state ) { return false; } seqno = m_ro_state->internal.m_sequence; return true; }
DoS Exec Code
0
ReadUserLogFileState::getSequenceNo( int &seqno ) const { if ( NULL == m_ro_state ) { return false; } seqno = m_ro_state->internal.m_sequence; return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,360
ReadUserLogStateAccess::getSequenceNumber( int &seqno ) const { return m_state->getSequenceNo( seqno ); }
DoS Exec Code
0
ReadUserLogStateAccess::getSequenceNumber( int &seqno ) const { return m_state->getSequenceNo( seqno ); }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,361
ReadUserLogStateAccess::getState( const ReadUserLogFileState *&state ) const { state = m_state; return true; }
DoS Exec Code
0
ReadUserLogStateAccess::getState( const ReadUserLogFileState *&state ) const { state = m_state; return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,362
ReadUserLogFileState::isInitialized( void ) const { if ( NULL == m_ro_state ) { return false; } if ( strcmp( m_ro_state->internal.m_signature, FileStateSignature ) ) { return false; } return true; }
DoS Exec Code
0
ReadUserLogFileState::isInitialized( void ) const { if ( NULL == m_ro_state ) { return false; } if ( strcmp( m_ro_state->internal.m_signature, FileStateSignature ) ) { return false; } return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,363
ReadUserLogStateAccess::isInitialized( void ) const { return m_state->isInitialized( ); }
DoS Exec Code
0
ReadUserLogStateAccess::isInitialized( void ) const { return m_state->isInitialized( ); }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,364
ReadUserLogFileState::isValid( void ) const { if ( !isInitialized() ) { return false; } if ( 0 == strlen(m_ro_state->internal.m_base_path) ) { return false; } return true; }
DoS Exec Code
0
ReadUserLogFileState::isValid( void ) const { if ( !isInitialized() ) { return false; } if ( 0 == strlen(m_ro_state->internal.m_base_path) ) { return false; } return true; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,365
ReadUserLogStateAccess::isValid( void ) const { return m_state->isValid( ); }
DoS Exec Code
0
ReadUserLogStateAccess::isValid( void ) const { return m_state->isValid( ); }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,366
ReadUserLogFileState::~ReadUserLogFileState( void ) { }
DoS Exec Code
0
ReadUserLogFileState::~ReadUserLogFileState( void ) { }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,367
ReadUserLogState::~ReadUserLogState( void ) { Reset( RESET_FULL ); }
DoS Exec Code
0
ReadUserLogState::~ReadUserLogState( void ) { Reset( RESET_FULL ); }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,368
ReadUserLogStateAccess::~ReadUserLogStateAccess(void) { delete m_state; }
DoS Exec Code
0
ReadUserLogStateAccess::~ReadUserLogStateAccess(void) { delete m_state; }
@@ -752,7 +752,7 @@ ReadUserLogState::SetState( const ReadUserLog::FileState &state ) MyString str; GetStateString( str, "Restored reader state" ); - dprintf( D_FULLDEBUG, str.Value() ); + dprintf( D_FULLDEBUG, "%s", str.Value() ); return true; }
CWE-134
null
null
13,369
static bool blit_is_unsafe(struct CirrusVGAState *s, bool dst_only) { /* should be the case, see cirrus_bitblt_start */ assert(s->cirrus_blt_width > 0); assert(s->cirrus_blt_height > 0); if (s->cirrus_blt_width > CIRRUS_BLTBUFSIZE) { return true; } if (blit_region_is_unsafe(s, s->cirru...
DoS
0
static bool blit_is_unsafe(struct CirrusVGAState *s, bool dst_only) { /* should be the case, see cirrus_bitblt_start */ assert(s->cirrus_blt_width > 0); assert(s->cirrus_blt_height > 0); if (s->cirrus_blt_width > CIRRUS_BLTBUFSIZE) { return true; } if (blit_region_is_unsafe(s, s->cirru...
@@ -661,9 +661,14 @@ static void cirrus_invalidate_region(CirrusVGAState * s, int off_begin, int off_cur; int off_cur_end; + if (off_pitch < 0) { + off_begin -= bytesperline - 1; + } + for (y = 0; y < lines; y++) { off_cur = off_begin; off_cur_end = (off_cur + bytesperline)...
CWE-125
null
null
13,370
static int cirrus_bitblt_solidfill(CirrusVGAState *s, int blt_rop) { cirrus_fill_t rop_func; if (blit_is_unsafe(s, true)) { return 0; } rop_func = cirrus_fill[rop_to_index[blt_rop]][s->cirrus_blt_pixelwidth - 1]; rop_func(s, s->vga.vram_ptr + (s->cirrus_blt_dstaddr & s->cirrus_addr_mask), ...
DoS
0
static int cirrus_bitblt_solidfill(CirrusVGAState *s, int blt_rop) { cirrus_fill_t rop_func; if (blit_is_unsafe(s, true)) { return 0; } rop_func = cirrus_fill[rop_to_index[blt_rop]][s->cirrus_blt_pixelwidth - 1]; rop_func(s, s->vga.vram_ptr + (s->cirrus_blt_dstaddr & s->cirrus_addr_mask), ...
@@ -661,9 +661,14 @@ static void cirrus_invalidate_region(CirrusVGAState * s, int off_begin, int off_cur; int off_cur_end; + if (off_pitch < 0) { + off_begin -= bytesperline - 1; + } + for (y = 0; y < lines; y++) { off_cur = off_begin; off_cur_end = (off_cur + bytesperline)...
CWE-125
null
null
13,371
static int cirrus_bitblt_videotovideo_copy(CirrusVGAState * s) { if (blit_is_unsafe(s, false)) return 0; return cirrus_do_copy(s, s->cirrus_blt_dstaddr - s->vga.start_addr, s->cirrus_blt_srcaddr - s->vga.start_addr, s->cirrus_blt_width, s->cirrus_blt_height); }
DoS
0
static int cirrus_bitblt_videotovideo_copy(CirrusVGAState * s) { if (blit_is_unsafe(s, false)) return 0; return cirrus_do_copy(s, s->cirrus_blt_dstaddr - s->vga.start_addr, s->cirrus_blt_srcaddr - s->vga.start_addr, s->cirrus_blt_width, s->cirrus_blt_height); }
@@ -661,9 +661,14 @@ static void cirrus_invalidate_region(CirrusVGAState * s, int off_begin, int off_cur; int off_cur_end; + if (off_pitch < 0) { + off_begin -= bytesperline - 1; + } + for (y = 0; y < lines; y++) { off_cur = off_begin; off_cur_end = (off_cur + bytesperline)...
CWE-125
null
null
13,372
static int cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, int h) { int sx = 0, sy = 0; int dx = 0, dy = 0; int depth = 0; int notify = 0; /* make sure to only copy if it's a plain copy ROP */ if (*s->cirrus_rop == cirrus_bitblt_rop_fwd_src || *s->cirrus_rop == cirrus_bitblt_...
DoS
0
static int cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, int h) { int sx = 0, sy = 0; int dx = 0, dy = 0; int depth = 0; int notify = 0; /* make sure to only copy if it's a plain copy ROP */ if (*s->cirrus_rop == cirrus_bitblt_rop_fwd_src || *s->cirrus_rop == cirrus_bitblt_...
@@ -661,9 +661,14 @@ static void cirrus_invalidate_region(CirrusVGAState * s, int off_begin, int off_cur; int off_cur_end; + if (off_pitch < 0) { + off_begin -= bytesperline - 1; + } + for (y = 0; y < lines; y++) { off_cur = off_begin; off_cur_end = (off_cur + bytesperline)...
CWE-125
null
null
13,373
static void cirrus_init_common(CirrusVGAState *s, Object *owner, int device_id, int is_pci, MemoryRegion *system_memory, MemoryRegion *system_io) { int i; static int inited; if (!inited) { inited = 1; ...
DoS
0
static void cirrus_init_common(CirrusVGAState *s, Object *owner, int device_id, int is_pci, MemoryRegion *system_memory, MemoryRegion *system_io) { int i; static int inited; if (!inited) { inited = 1; ...
@@ -661,9 +661,14 @@ static void cirrus_invalidate_region(CirrusVGAState * s, int off_begin, int off_cur; int off_cur_end; + if (off_pitch < 0) { + off_begin -= bytesperline - 1; + } + for (y = 0; y < lines; y++) { off_cur = off_begin; off_cur_end = (off_cur + bytesperline)...
CWE-125
null
null
13,374
static void cirrus_vga_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); k->realize = pci_cirrus_vga_realize; k->romfile = VGABIOS_CIRRUS_FILENAME; k->vendor_id = PCI_VENDOR_ID_CIRRUS; k->device_id = CIRRUS_ID_CLGD54...
DoS
0
static void cirrus_vga_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); k->realize = pci_cirrus_vga_realize; k->romfile = VGABIOS_CIRRUS_FILENAME; k->vendor_id = PCI_VENDOR_ID_CIRRUS; k->device_id = CIRRUS_ID_CLGD54...
@@ -661,9 +661,14 @@ static void cirrus_invalidate_region(CirrusVGAState * s, int off_begin, int off_cur; int off_cur_end; + if (off_pitch < 0) { + off_begin -= bytesperline - 1; + } + for (y = 0; y < lines; y++) { off_cur = off_begin; off_cur_end = (off_cur + bytesperline)...
CWE-125
null
null
13,375
static void cirrus_vga_write_sr(CirrusVGAState * s, uint32_t val) { switch (s->vga.sr_index) { case 0x00: // Standard VGA case 0x01: // Standard VGA case 0x02: // Standard VGA case 0x03: // Standard VGA case 0x04: // Standard VGA s->vga.sr[s->vga.sr_index] = val & sr_mask[s->vga.sr_in...
DoS
0
static void cirrus_vga_write_sr(CirrusVGAState * s, uint32_t val) { switch (s->vga.sr_index) { case 0x00: // Standard VGA case 0x01: // Standard VGA case 0x02: // Standard VGA case 0x03: // Standard VGA case 0x04: // Standard VGA s->vga.sr[s->vga.sr_index] = val & sr_mask[s->vga.sr_in...
@@ -661,9 +661,14 @@ static void cirrus_invalidate_region(CirrusVGAState * s, int off_begin, int off_cur; int off_cur_end; + if (off_pitch < 0) { + off_begin -= bytesperline - 1; + } + for (y = 0; y < lines; y++) { off_cur = off_begin; off_cur_end = (off_cur + bytesperline)...
CWE-125
null
null
13,376
static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp) { PCICirrusVGAState *d = PCI_CIRRUS_VGA(dev); CirrusVGAState *s = &d->cirrus_vga; PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev); int16_t device_id = pc->device_id; /* follow real hardware, cirrus card emulated has 4 MB video mem...
DoS
0
static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp) { PCICirrusVGAState *d = PCI_CIRRUS_VGA(dev); CirrusVGAState *s = &d->cirrus_vga; PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev); int16_t device_id = pc->device_id; /* follow real hardware, cirrus card emulated has 4 MB video mem...
@@ -661,9 +661,14 @@ static void cirrus_invalidate_region(CirrusVGAState * s, int off_begin, int off_cur; int off_cur_end; + if (off_pitch < 0) { + off_begin -= bytesperline - 1; + } + for (y = 0; y < lines; y++) { off_cur = off_begin; off_cur_end = (off_cur + bytesperline)...
CWE-125
null
null
13,377
check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, gx_io_device *iodev, const char *permitgroup) { long i; ref *permitlist = NULL; /* an empty string (first character == 0) if '\' character is */ /* recognized as a file name separator as on DOS & Windows...
+Info
0
check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, gx_io_device *iodev, const char *permitgroup) { long i; ref *permitlist = NULL; /* an empty string (first character == 0) if '\' character is */ /* recognized as a file name separator as on DOS & Windows...
@@ -410,7 +410,7 @@ file_continue(i_ctx_t *i_ctx_p) } else if (code > len) /* overran string */ return_error(gs_error_rangecheck); else if (iodev != iodev_default(imemory) - || (check_file_permissions_reduced(i_ctx_p, (char *)pscratch->value.bytes, code + devlen, iodev, ...
CWE-200
null
null
13,378
lib_file_open_search_with_combine(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx_p, const char *fname, uint flen, char *buffer, int blen, uint *pclen, ref *pfile, gx_io_device *iodev, bool starting_arg_file, char *fmode) { strea...
+Info
0
lib_file_open_search_with_combine(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx_p, const char *fname, uint flen, char *buffer, int blen, uint *pclen, ref *pfile, gx_io_device *iodev, bool starting_arg_file, char *fmode) { strea...
@@ -410,7 +410,7 @@ file_continue(i_ctx_t *i_ctx_p) } else if (code > len) /* overran string */ return_error(gs_error_rangecheck); else if (iodev != iodev_default(imemory) - || (check_file_permissions_reduced(i_ctx_p, (char *)pscratch->value.bytes, code + devlen, iodev, ...
CWE-200
null
null
13,379
zopen_file(i_ctx_t *i_ctx_p, const gs_parsed_file_name_t *pfn, const char *file_access, stream **ps, gs_memory_t *mem) { gx_io_device *const iodev = pfn->iodev; int code = 0; if (pfn->fname == NULL) { /* just a device */ iodev->state = i_ctx_p; code = iodev->procs.open_device...
+Info
0
zopen_file(i_ctx_t *i_ctx_p, const gs_parsed_file_name_t *pfn, const char *file_access, stream **ps, gs_memory_t *mem) { gx_io_device *const iodev = pfn->iodev; int code = 0; if (pfn->fname == NULL) { /* just a device */ iodev->state = i_ctx_p; code = iodev->procs.open_device...
@@ -410,7 +410,7 @@ file_continue(i_ctx_t *i_ctx_p) } else if (code > len) /* overran string */ return_error(gs_error_rangecheck); else if (iodev != iodev_default(imemory) - || (check_file_permissions_reduced(i_ctx_p, (char *)pscratch->value.bytes, code + devlen, iodev, ...
CWE-200
null
null
13,380
static int is_white(int c) { return c == '\x00' || c == '\x09' || c == '\x0a' || c == '\x0c' || c == '\x0d' || c == '\x20'; }
Exec Code Overflow
0
static int is_white(int c) { return c == '\x00' || c == '\x09' || c == '\x0a' || c == '\x0c' || c == '\x0d' || c == '\x20'; }
@@ -6,9 +6,6 @@ /* Scan file for objects and reconstruct xref table */ -/* Define in PDF 1.7 to be 8388607, but mupdf is more lenient. */ -#define MAX_OBJECT_NUMBER (10 << 20) - struct entry { int num; @@ -436,7 +433,7 @@ pdf_repair_xref(fz_context *ctx, pdf_document *doc) ...
CWE-119
null
null
13,381
orphan_object(fz_context *ctx, pdf_document *doc, pdf_obj *obj) { if (doc->orphans_count == doc->orphans_max) { int new_max = (doc->orphans_max ? doc->orphans_max*2 : 32); fz_try(ctx) { doc->orphans = fz_resize_array(ctx, doc->orphans, new_max, sizeof(*doc->orphans)); doc->orphans_max = new_max; } fz...
Exec Code Overflow
0
orphan_object(fz_context *ctx, pdf_document *doc, pdf_obj *obj) { if (doc->orphans_count == doc->orphans_max) { int new_max = (doc->orphans_max ? doc->orphans_max*2 : 32); fz_try(ctx) { doc->orphans = fz_resize_array(ctx, doc->orphans, new_max, sizeof(*doc->orphans)); doc->orphans_max = new_max; } fz...
@@ -6,9 +6,6 @@ /* Scan file for objects and reconstruct xref table */ -/* Define in PDF 1.7 to be 8388607, but mupdf is more lenient. */ -#define MAX_OBJECT_NUMBER (10 << 20) - struct entry { int num; @@ -436,7 +433,7 @@ pdf_repair_xref(fz_context *ctx, pdf_document *doc) ...
CWE-119
null
null
13,382
pdf_repair_obj(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf, int64_t *stmofsp, int *stmlenp, pdf_obj **encrypt, pdf_obj **id, pdf_obj **page, int64_t *tmpofs, pdf_obj **root) { fz_stream *file = doc->file; pdf_token tok; int stm_len; *stmofsp = 0; if (stmlenp) *stmlenp = -1; stm_len = 0; /* On entry ...
Exec Code Overflow
0
pdf_repair_obj(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf, int64_t *stmofsp, int *stmlenp, pdf_obj **encrypt, pdf_obj **id, pdf_obj **page, int64_t *tmpofs, pdf_obj **root) { fz_stream *file = doc->file; pdf_token tok; int stm_len; *stmofsp = 0; if (stmlenp) *stmlenp = -1; stm_len = 0; /* On entry ...
@@ -6,9 +6,6 @@ /* Scan file for objects and reconstruct xref table */ -/* Define in PDF 1.7 to be 8388607, but mupdf is more lenient. */ -#define MAX_OBJECT_NUMBER (10 << 20) - struct entry { int num; @@ -436,7 +433,7 @@ pdf_repair_xref(fz_context *ctx, pdf_document *doc) ...
CWE-119
null
null
13,383
pdf_repair_obj_stm(fz_context *ctx, pdf_document *doc, int stm_num) { pdf_obj *obj; fz_stream *stm = NULL; pdf_token tok; int i, n, count; pdf_lexbuf buf; fz_var(stm); pdf_lexbuf_init(ctx, &buf, PDF_LEXBUF_SMALL); fz_try(ctx) { obj = pdf_load_object(ctx, doc, stm_num); count = pdf_to_int(ctx, pdf_dict_...
Exec Code Overflow
0
pdf_repair_obj_stm(fz_context *ctx, pdf_document *doc, int stm_num) { pdf_obj *obj; fz_stream *stm = NULL; pdf_token tok; int i, n, count; pdf_lexbuf buf; fz_var(stm); pdf_lexbuf_init(ctx, &buf, PDF_LEXBUF_SMALL); fz_try(ctx) { obj = pdf_load_object(ctx, doc, stm_num); count = pdf_to_int(ctx, pdf_dict_...
@@ -6,9 +6,6 @@ /* Scan file for objects and reconstruct xref table */ -/* Define in PDF 1.7 to be 8388607, but mupdf is more lenient. */ -#define MAX_OBJECT_NUMBER (10 << 20) - struct entry { int num; @@ -436,7 +433,7 @@ pdf_repair_xref(fz_context *ctx, pdf_document *doc) ...
CWE-119
null
null
13,384
pdf_cache_object(fz_context *ctx, pdf_document *doc, int num) { pdf_xref_entry *x; int rnum, rgen, try_repair; fz_var(try_repair); if (num <= 0 || num >= pdf_xref_len(ctx, doc)) fz_throw(ctx, FZ_ERROR_GENERIC, "object out of range (%d 0 R); xref size %d", num, pdf_xref_len(ctx, doc)); object_updated: try_repa...
Exec Code Overflow
0
pdf_cache_object(fz_context *ctx, pdf_document *doc, int num) { pdf_xref_entry *x; int rnum, rgen, try_repair; fz_var(try_repair); if (num <= 0 || num >= pdf_xref_len(ctx, doc)) fz_throw(ctx, FZ_ERROR_GENERIC, "object out of range (%d 0 R); xref size %d", num, pdf_xref_len(ctx, doc)); object_updated: try_repa...
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,385
pdf_count_objects(fz_context *ctx, pdf_document *doc) { return pdf_xref_len(ctx, doc); }
Exec Code Overflow
0
pdf_count_objects(fz_context *ctx, pdf_document *doc) { return pdf_xref_len(ctx, doc); }
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,386
pdf_drop_document(fz_context *ctx, pdf_document *doc) { fz_drop_document(ctx, &doc->super); }
Exec Code Overflow
0
pdf_drop_document(fz_context *ctx, pdf_document *doc) { fz_drop_document(ctx, &doc->super); }
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,387
pdf_drop_document_imp(fz_context *ctx, pdf_document *doc) { int i; fz_defer_reap_start(ctx); /* Type3 glyphs in the glyph cache can contain pdf_obj pointers * that we are about to destroy. Simplest solution is to bin the * glyph cache at this point. */ fz_try(ctx) fz_purge_glyph_cache(ctx); fz_catch(ctx) ...
Exec Code Overflow
0
pdf_drop_document_imp(fz_context *ctx, pdf_document *doc) { int i; fz_defer_reap_start(ctx); /* Type3 glyphs in the glyph cache can contain pdf_obj pointers * that we are about to destroy. Simplest solution is to bin the * glyph cache at this point. */ fz_try(ctx) fz_purge_glyph_cache(ctx); fz_catch(ctx) ...
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,388
static void pdf_drop_xref_sections(fz_context *ctx, pdf_document *doc) { pdf_drop_xref_sections_imp(ctx, doc, doc->saved_xref_sections, doc->saved_num_xref_sections); pdf_drop_xref_sections_imp(ctx, doc, doc->xref_sections, doc->num_xref_sections); doc->saved_xref_sections = NULL; doc->saved_num_xref_sections = 0;...
Exec Code Overflow
0
static void pdf_drop_xref_sections(fz_context *ctx, pdf_document *doc) { pdf_drop_xref_sections_imp(ctx, doc, doc->saved_xref_sections, doc->saved_num_xref_sections); pdf_drop_xref_sections_imp(ctx, doc, doc->xref_sections, doc->num_xref_sections); doc->saved_xref_sections = NULL; doc->saved_num_xref_sections = 0;...
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,389
static void pdf_drop_xref_sections_imp(fz_context *ctx, pdf_document *doc, pdf_xref *xref_sections, int num_xref_sections) { pdf_unsaved_sig *usig; int x, e; for (x = 0; x < num_xref_sections; x++) { pdf_xref *xref = &xref_sections[x]; pdf_xref_subsec *sub = xref->subsec; while (sub != NULL) { pdf_xref...
Exec Code Overflow
0
static void pdf_drop_xref_sections_imp(fz_context *ctx, pdf_document *doc, pdf_xref *xref_sections, int num_xref_sections) { pdf_unsaved_sig *usig; int x, e; for (x = 0; x < num_xref_sections; x++) { pdf_xref *xref = &xref_sections[x]; pdf_xref_subsec *sub = xref->subsec; while (sub != NULL) { pdf_xref...
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,390
void pdf_ensure_solid_xref(fz_context *ctx, pdf_document *doc, int num) { if (doc->num_xref_sections == 0) pdf_populate_next_xref_level(ctx, doc); ensure_solid_xref(ctx, doc, num, doc->num_xref_sections-1); }
Exec Code Overflow
0
void pdf_ensure_solid_xref(fz_context *ctx, pdf_document *doc, int num) { if (doc->num_xref_sections == 0) pdf_populate_next_xref_level(ctx, doc); ensure_solid_xref(ctx, doc, num, doc->num_xref_sections-1); }
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,391
pdf_xref_entry *pdf_get_populating_xref_entry(fz_context *ctx, pdf_document *doc, int num) { /* Return an entry within the xref currently being populated */ pdf_xref *xref; pdf_xref_subsec *sub; if (doc->num_xref_sections == 0) { doc->xref_sections = fz_malloc_struct(ctx, pdf_xref); doc->num_xref_sections = 1...
Exec Code Overflow
0
pdf_xref_entry *pdf_get_populating_xref_entry(fz_context *ctx, pdf_document *doc, int num) { /* Return an entry within the xref currently being populated */ pdf_xref *xref; pdf_xref_subsec *sub; if (doc->num_xref_sections == 0) { doc->xref_sections = fz_malloc_struct(ctx, pdf_xref); doc->num_xref_sections = 1...
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,392
pdf_xref_entry *pdf_get_xref_entry(fz_context *ctx, pdf_document *doc, int i) { pdf_xref *xref = NULL; pdf_xref_subsec *sub; int j; if (i < 0) fz_throw(ctx, FZ_ERROR_GENERIC, "Negative object number requested"); if (i <= doc->max_xref_len) j = doc->xref_index[i]; else j = 0; /* We may be accessing an ea...
Exec Code Overflow
0
pdf_xref_entry *pdf_get_xref_entry(fz_context *ctx, pdf_document *doc, int i) { pdf_xref *xref = NULL; pdf_xref_subsec *sub; int j; if (i < 0) fz_throw(ctx, FZ_ERROR_GENERIC, "Negative object number requested"); if (i <= doc->max_xref_len) j = doc->xref_index[i]; else j = 0; /* We may be accessing an ea...
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,393
pdf_keep_document(fz_context *ctx, pdf_document *doc) { return (pdf_document *)fz_keep_document(ctx, &doc->super); }
Exec Code Overflow
0
pdf_keep_document(fz_context *ctx, pdf_document *doc) { return (pdf_document *)fz_keep_document(ctx, &doc->super); }
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,394
pdf_load_hinted_page(fz_context *ctx, pdf_document *doc, int pagenum) { if (!doc->hints_loaded || !doc->linear_page_refs) return; if (doc->linear_page_refs[pagenum]) return; fz_try(ctx) { int num = doc->hint_page[pagenum].number; pdf_obj *page = pdf_load_object(ctx, doc, num); if (pdf_name_eq(ctx, PDF_N...
Exec Code Overflow
0
pdf_load_hinted_page(fz_context *ctx, pdf_document *doc, int pagenum) { if (!doc->hints_loaded || !doc->linear_page_refs) return; if (doc->linear_page_refs[pagenum]) return; fz_try(ctx) { int num = doc->hint_page[pagenum].number; pdf_obj *page = pdf_load_object(ctx, doc, num); if (pdf_name_eq(ctx, PDF_N...
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,395
pdf_load_object(fz_context *ctx, pdf_document *doc, int num) { pdf_xref_entry *entry = pdf_cache_object(ctx, doc, num); assert(entry->obj != NULL); return pdf_keep_obj(ctx, entry->obj); }
Exec Code Overflow
0
pdf_load_object(fz_context *ctx, pdf_document *doc, int num) { pdf_xref_entry *entry = pdf_cache_object(ctx, doc, num); assert(entry->obj != NULL); return pdf_keep_obj(ctx, entry->obj); }
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,396
pdf_load_version(fz_context *ctx, pdf_document *doc) { char buf[20]; fz_seek(ctx, doc->file, 0, SEEK_SET); fz_read_line(ctx, doc->file, buf, sizeof buf); if (memcmp(buf, "%PDF-", 5) != 0) fz_throw(ctx, FZ_ERROR_GENERIC, "cannot recognize version marker"); doc->version = 10 * (fz_atof(buf+5) + 0.05f); if (doc-...
Exec Code Overflow
0
pdf_load_version(fz_context *ctx, pdf_document *doc) { char buf[20]; fz_seek(ctx, doc->file, 0, SEEK_SET); fz_read_line(ctx, doc->file, buf, sizeof buf); if (memcmp(buf, "%PDF-", 5) != 0) fz_throw(ctx, FZ_ERROR_GENERIC, "cannot recognize version marker"); doc->version = 10 * (fz_atof(buf+5) + 0.05f); if (doc-...
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,397
pdf_load_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) { int i; int xref_len; pdf_xref_entry *entry; pdf_read_start_xref(ctx, doc); pdf_read_xref_sections(ctx, doc, doc->startxref, buf, 1); if (pdf_xref_len(ctx, doc) == 0) fz_throw(ctx, FZ_ERROR_GENERIC, "found xref was empty"); pdf_prime_xref_...
Exec Code Overflow
0
pdf_load_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) { int i; int xref_len; pdf_xref_entry *entry; pdf_read_start_xref(ctx, doc); pdf_read_xref_sections(ctx, doc, doc->startxref, buf, 1); if (pdf_xref_len(ctx, doc) == 0) fz_throw(ctx, FZ_ERROR_GENERIC, "found xref was empty"); pdf_prime_xref_...
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,398
static void pdf_populate_next_xref_level(fz_context *ctx, pdf_document *doc) { pdf_xref *xref; doc->xref_sections = fz_resize_array(ctx, doc->xref_sections, doc->num_xref_sections + 1, sizeof(pdf_xref)); doc->num_xref_sections++; xref = &doc->xref_sections[doc->num_xref_sections - 1]; xref->subsec = NULL; xref->...
Exec Code Overflow
0
static void pdf_populate_next_xref_level(fz_context *ctx, pdf_document *doc) { pdf_xref *xref; doc->xref_sections = fz_resize_array(ctx, doc->xref_sections, doc->num_xref_sections + 1, sizeof(pdf_xref)); doc->num_xref_sections++; xref = &doc->xref_sections[doc->num_xref_sections - 1]; xref->subsec = NULL; xref->...
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null
13,399
pdf_read_new_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) { fz_stream *stm = NULL; pdf_obj *trailer = NULL; pdf_obj *index = NULL; pdf_obj *obj = NULL; int gen, num = 0; int64_t ofs, stm_ofs; int size, w0, w1, w2; int t; fz_var(trailer); fz_var(stm); fz_try(ctx) { ofs = fz_tell(ctx, doc->fi...
Exec Code Overflow
0
pdf_read_new_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) { fz_stream *stm = NULL; pdf_obj *trailer = NULL; pdf_obj *index = NULL; pdf_obj *obj = NULL; int gen, num = 0; int64_t ofs, stm_ofs; int size, w0, w1, w2; int t; fz_var(trailer); fz_var(stm); fz_try(ctx) { ofs = fz_tell(ctx, doc->fi...
@@ -868,11 +868,12 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) fz_seek(ctx, file, -(2 + (int)strlen(s)), SEEK_CUR); } - if (ofs < 0) - fz_throw(ctx, FZ_ERROR_GENERIC, "out of range object num in xref: %d", (int)o...
CWE-119
null
null