idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
3,000
_dbus_delete_directory (const DBusString *filename, DBusError *error) { const char *filename_c; _DBUS_ASSERT_ERROR_IS_CLEAR (error); filename_c = _dbus_string_get_const_data (filename); if (RemoveDirectoryA (filename_c) == 0) { char *emsg = _dbus_win_error_string (Get...
DoS
0
_dbus_delete_directory (const DBusString *filename, DBusError *error) { const char *filename_c; _DBUS_ASSERT_ERROR_IS_CLEAR (error); filename_c = _dbus_string_get_const_data (filename); if (RemoveDirectoryA (filename_c) == 0) { char *emsg = _dbus_win_error_string (Get...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,001
_dbus_delete_file (const DBusString *filename, DBusError *error) { const char *filename_c; _DBUS_ASSERT_ERROR_IS_CLEAR (error); filename_c = _dbus_string_get_const_data (filename); if (DeleteFileA (filename_c) == 0) { dbus_set_error (error, DBUS_ERROR_FAILED, ...
DoS
0
_dbus_delete_file (const DBusString *filename, DBusError *error) { const char *filename_c; _DBUS_ASSERT_ERROR_IS_CLEAR (error); filename_c = _dbus_string_get_const_data (filename); if (DeleteFileA (filename_c) == 0) { dbus_set_error (error, DBUS_ERROR_FAILED, ...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,002
_dbus_disable_sigpipe (void) { }
DoS
0
_dbus_disable_sigpipe (void) { }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,003
_dbus_fd_set_close_on_exec (intptr_t handle) { if ( !SetHandleInformation( (HANDLE) handle, HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE, 0 /*disable both flags*/ ) ) { _dbus_win_warn_win_error ("Disabling socket handle inheritance failed:", GetLastErr...
DoS
0
_dbus_fd_set_close_on_exec (intptr_t handle) { if ( !SetHandleInformation( (HANDLE) handle, HANDLE_FLAG_INHERIT | HANDLE_FLAG_PROTECT_FROM_CLOSE, 0 /*disable both flags*/ ) ) { _dbus_win_warn_win_error ("Disabling socket handle inheritance failed:", GetLastErr...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,004
_dbus_full_duplex_pipe (int *fd1, int *fd2, dbus_bool_t blocking, DBusError *error) { SOCKET temp, socket1 = -1, socket2 = -1; struct sockaddr_in saddr; int len; u_long arg; _dbus_win_startup_winsock (); temp = socket (...
DoS
0
_dbus_full_duplex_pipe (int *fd1, int *fd2, dbus_bool_t blocking, DBusError *error) { SOCKET temp, socket1 = -1, socket2 = -1; struct sockaddr_in saddr; int len; u_long arg; _dbus_win_startup_winsock (); temp = socket (...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,005
_dbus_generate_random_bytes (DBusString *str, int n_bytes) { int old_len; char *p; HCRYPTPROV hprov; old_len = _dbus_string_get_length (str); if (!_dbus_string_lengthen (str, n_bytes)) return FALSE; p = _dbus_string_get_data_len (str, old_len, n_bytes); if (!Cr...
DoS
0
_dbus_generate_random_bytes (DBusString *str, int n_bytes) { int old_len; char *p; HCRYPTPROV hprov; old_len = _dbus_string_get_length (str); if (!_dbus_string_lengthen (str, n_bytes)) return FALSE; p = _dbus_string_get_data_len (str, old_len, n_bytes); if (!Cr...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,006
_dbus_get_address_string (DBusString *out, const char *basestring, const char *scope) { _dbus_string_init(out); _dbus_string_append(out,basestring); if (!scope) { return TRUE; } else if (strcmp(scope,"*install-path") == 0 || strcmp(scope,"install-path") == 0) { DBusString temp; ...
DoS
0
_dbus_get_address_string (DBusString *out, const char *basestring, const char *scope) { _dbus_string_init(out); _dbus_string_append(out,basestring); if (!scope) { return TRUE; } else if (strcmp(scope,"*install-path") == 0 || strcmp(scope,"install-path") == 0) { DBusString temp; ...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,007
_dbus_get_autolaunch_address (const char *scope, DBusString *address, DBusError *error) { HANDLE mutex; STARTUPINFOA si; PROCESS_INFORMATION pi; dbus_bool_t retval = FALSE; LPSTR lpFile; char dbus_exe_path[MAX_PATH]; char dbus_args[MAX_PATH * 2]; const char * daemon_name = ...
DoS
0
_dbus_get_autolaunch_address (const char *scope, DBusString *address, DBusError *error) { HANDLE mutex; STARTUPINFOA si; PROCESS_INFORMATION pi; dbus_bool_t retval = FALSE; LPSTR lpFile; char dbus_exe_path[MAX_PATH]; char dbus_args[MAX_PATH * 2]; const char * daemon_name = ...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,008
_dbus_get_autolaunch_shm (DBusString *address, DBusString *shm_name) { HANDLE sharedMem; char *shared_addr; int i; for(i=0;i<20;++i) { sharedMem = OpenFileMappingA( FILE_MAP_READ, FALSE, _dbus_string_get_const_data(shm_name)); if( sharedMem == 0 ) Sleep( 100 ); if ( sharedMem != 0) ...
DoS
0
_dbus_get_autolaunch_shm (DBusString *address, DBusString *shm_name) { HANDLE sharedMem; char *shared_addr; int i; for(i=0;i<20;++i) { sharedMem = OpenFileMappingA( FILE_MAP_READ, FALSE, _dbus_string_get_const_data(shm_name)); if( sharedMem == 0 ) Sleep( 100 ); if ( sharedMem != 0) ...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,009
_dbus_get_config_file_name(DBusString *config_file, char *s) { char path[MAX_PATH*2]; int path_size = sizeof(path); if (!_dbus_get_install_root(path,path_size)) return FALSE; if(strlen(s) + 4 + strlen(path) > sizeof(path)-2) return FALSE; strcat(path,"etc\\"); strcat(path,s); if (_dbus_file_exis...
DoS
0
_dbus_get_config_file_name(DBusString *config_file, char *s) { char path[MAX_PATH*2]; int path_size = sizeof(path); if (!_dbus_get_install_root(path,path_size)) return FALSE; if(strlen(s) + 4 + strlen(path) > sizeof(path)-2) return FALSE; strcat(path,"etc\\"); strcat(path,s); if (_dbus_file_exis...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,010
_dbus_get_install_root(char *prefix, int len) { DWORD pathLength; char *lastSlash; SetLastError( 0 ); pathLength = GetModuleFileNameA(_dbus_win_get_dll_hmodule(), prefix, len); if ( pathLength == 0 || GetLastError() != 0 ) { *prefix = '\0'; return FALSE; } lastSlash = _mbsrch...
DoS
0
_dbus_get_install_root(char *prefix, int len) { DWORD pathLength; char *lastSlash; SetLastError( 0 ); pathLength = GetModuleFileNameA(_dbus_win_get_dll_hmodule(), prefix, len); if ( pathLength == 0 || GetLastError() != 0 ) { *prefix = '\0'; return FALSE; } lastSlash = _mbsrch...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,011
_dbus_get_install_root_as_hash(DBusString *out) { DBusString install_path; char path[MAX_PATH*2]; int path_size = sizeof(path); if (!_dbus_get_install_root(path,path_size)) return FALSE; _dbus_string_init(&install_path); _dbus_string_append(&install_path,path); _dbus_string_init(...
DoS
0
_dbus_get_install_root_as_hash(DBusString *out) { DBusString install_path; char path[MAX_PATH*2]; int path_size = sizeof(path); if (!_dbus_get_install_root(path,path_size)) return FALSE; _dbus_string_init(&install_path); _dbus_string_append(&install_path,path); _dbus_string_init(...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,012
_dbus_get_is_errno_eagain_or_ewouldblock (void) { return errno == WSAEWOULDBLOCK; }
DoS
0
_dbus_get_is_errno_eagain_or_ewouldblock (void) { return errno == WSAEWOULDBLOCK; }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,013
_dbus_get_monotonic_time (long *tv_sec, long *tv_usec) { /* no implementation yet, fall back to wall-clock time */ _dbus_get_real_time (tv_sec, tv_usec); }
DoS
0
_dbus_get_monotonic_time (long *tv_sec, long *tv_usec) { /* no implementation yet, fall back to wall-clock time */ _dbus_get_real_time (tv_sec, tv_usec); }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,014
_dbus_get_mutex_name (DBusString *out,const char *scope) { return _dbus_get_address_string (out,cDBusDaemonMutex,scope); }
DoS
0
_dbus_get_mutex_name (DBusString *out,const char *scope) { return _dbus_get_address_string (out,cDBusDaemonMutex,scope); }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,015
_dbus_get_real_time (long *tv_sec, long *tv_usec) { FILETIME ft; dbus_uint64_t time64; GetSystemTimeAsFileTime (&ft); memcpy (&time64, &ft, sizeof (time64)); /* Convert from 100s of nanoseconds since 1601-01-01 * to Unix epoch. Yes, this is Y2038 unsafe. */ time64 -= DBUS_INT64_C...
DoS
0
_dbus_get_real_time (long *tv_sec, long *tv_usec) { FILETIME ft; dbus_uint64_t time64; GetSystemTimeAsFileTime (&ft); memcpy (&time64, &ft, sizeof (time64)); /* Convert from 100s of nanoseconds since 1601-01-01 * to Unix epoch. Yes, this is Y2038 unsafe. */ time64 -= DBUS_INT64_C...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,016
_dbus_get_shm_name (DBusString *out,const char *scope) { return _dbus_get_address_string (out,cDBusDaemonAddressInfo,scope); }
DoS
0
_dbus_get_shm_name (DBusString *out,const char *scope) { return _dbus_get_address_string (out,cDBusDaemonAddressInfo,scope); }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,017
_dbus_get_standard_session_servicedirs (DBusList **dirs) { const char *common_progs; DBusString servicedir_path; if (!_dbus_string_init (&servicedir_path)) return FALSE; #ifdef DBUS_WINCE { /* On Windows CE, we adjust datadir dynamically to installation location. */ const char *data_dir = _dbus_g...
DoS
0
_dbus_get_standard_session_servicedirs (DBusList **dirs) { const char *common_progs; DBusString servicedir_path; if (!_dbus_string_init (&servicedir_path)) return FALSE; #ifdef DBUS_WINCE { /* On Windows CE, we adjust datadir dynamically to installation location. */ const char *data_dir = _dbus_g...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,018
_dbus_get_standard_system_servicedirs (DBusList **dirs) { *dirs = NULL; return TRUE; }
DoS
0
_dbus_get_standard_system_servicedirs (DBusList **dirs) { *dirs = NULL; return TRUE; }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,019
_dbus_getpid (void) { return GetCurrentProcessId (); }
DoS
0
_dbus_getpid (void) { return GetCurrentProcessId (); }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,020
HANDLE _dbus_global_lock (const char *mutexname) { HANDLE mutex; DWORD gotMutex; mutex = CreateMutexA( NULL, FALSE, mutexname ); if( !mutex ) { return FALSE; } gotMutex = WaitForSingleObject( mutex, INFINITE ); switch( gotMutex ) { case WAIT_ABANDONED: ReleaseMut...
DoS
0
HANDLE _dbus_global_lock (const char *mutexname) { HANDLE mutex; DWORD gotMutex; mutex = CreateMutexA( NULL, FALSE, mutexname ); if( !mutex ) { return FALSE; } gotMutex = WaitForSingleObject( mutex, INFINITE ); switch( gotMutex ) { case WAIT_ABANDONED: ReleaseMut...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,021
void _dbus_global_unlock (HANDLE mutex) { ReleaseMutex (mutex); CloseHandle (mutex); }
DoS
0
void _dbus_global_unlock (HANDLE mutex) { ReleaseMutex (mutex); CloseHandle (mutex); }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,022
_dbus_listen_tcp_socket (const char *host, const char *port, const char *family, DBusString *retport, int **fds_p, DBusError *error) { int nlisten_fd = 0, *listen...
DoS
0
_dbus_listen_tcp_socket (const char *host, const char *port, const char *family, DBusString *retport, int **fds_p, DBusError *error) { int nlisten_fd = 0, *listen...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,023
_dbus_lookup_session_address (dbus_bool_t *supported, DBusString *address, DBusError *error) { /* Probably fill this in with something based on COM? */ *supported = FALSE; return TRUE; }
DoS
0
_dbus_lookup_session_address (dbus_bool_t *supported, DBusString *address, DBusError *error) { /* Probably fill this in with something based on COM? */ *supported = FALSE; return TRUE; }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,024
_dbus_make_file_world_readable(const DBusString *filename, DBusError *error) { return TRUE; }
DoS
0
_dbus_make_file_world_readable(const DBusString *filename, DBusError *error) { return TRUE; }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,025
_dbus_path_is_absolute (const DBusString *filename) { if (_dbus_string_get_length (filename) > 0) return _dbus_string_get_byte (filename, 1) == ':' || _dbus_string_get_byte (filename, 0) == '\\' || _dbus_string_get_byte (filename, 0) == '/'; else return FALSE; }
DoS
0
_dbus_path_is_absolute (const DBusString *filename) { if (_dbus_string_get_length (filename) > 0) return _dbus_string_get_byte (filename, 1) == ':' || _dbus_string_get_byte (filename, 0) == '\\' || _dbus_string_get_byte (filename, 0) == '/'; else return FALSE; }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,026
dbus_bool_t _dbus_read_local_machine_uuid (DBusGUID *machine_id, dbus_bool_t create_if_not_found, DBusError *error) { #ifdef DBUS_WINCE return TRUE; #else HW_PROFILE_INFOA info; char *lpc = &info.sz...
DoS
0
dbus_bool_t _dbus_read_local_machine_uuid (DBusGUID *machine_id, dbus_bool_t create_if_not_found, DBusError *error) { #ifdef DBUS_WINCE return TRUE; #else HW_PROFILE_INFOA info; char *lpc = &info.sz...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,027
_dbus_read_socket (int fd, DBusString *buffer, int count) { int bytes_read; int start; char *data; _dbus_assert (count >= 0); start = _dbus_string_get_length (buffer); if (!_dbus_string_lengthen (buffer, count)) { _dbus_win...
DoS
0
_dbus_read_socket (int fd, DBusString *buffer, int count) { int bytes_read; int start; char *data; _dbus_assert (count >= 0); start = _dbus_string_get_length (buffer); if (!_dbus_string_lengthen (buffer, count)) { _dbus_win...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,028
_dbus_set_fd_nonblocking (int handle, DBusError *error) { u_long one = 1; _DBUS_ASSERT_ERROR_IS_CLEAR (error); if (ioctlsocket (handle, FIONBIO, &one) == SOCKET_ERROR) { DBUS_SOCKET_SET_ERRNO (); dbus_set_error (error, _dbus_error_from_errno (errno), ...
DoS
0
_dbus_set_fd_nonblocking (int handle, DBusError *error) { u_long one = 1; _DBUS_ASSERT_ERROR_IS_CLEAR (error); if (ioctlsocket (handle, FIONBIO, &one) == SOCKET_ERROR) { DBUS_SOCKET_SET_ERRNO (); dbus_set_error (error, _dbus_error_from_errno (errno), ...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,029
_dbus_socket_is_invalid (int fd) { return fd == INVALID_SOCKET ? TRUE : FALSE; }
DoS
0
_dbus_socket_is_invalid (int fd) { return fd == INVALID_SOCKET ? TRUE : FALSE; }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,030
_dbus_strerror (int error_number) { #ifdef DBUS_WINCE return "unknown"; #else const char *msg; switch (error_number) { case WSAEINTR: return "Interrupted function call"; case WSAEACCES: return "Permission denied"; case WSAEFAULT: return "Bad address"; case WSAEINVAL: r...
DoS
0
_dbus_strerror (int error_number) { #ifdef DBUS_WINCE return "unknown"; #else const char *msg; switch (error_number) { case WSAEINTR: return "Interrupted function call"; case WSAEACCES: return "Permission denied"; case WSAEFAULT: return "Bad address"; case WSAEINVAL: r...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,031
_dbus_win_error_from_last_error (void) { switch (GetLastError()) { case 0: return DBUS_ERROR_FAILED; case ERROR_NO_MORE_FILES: case ERROR_TOO_MANY_OPEN_FILES: return DBUS_ERROR_LIMITS_EXCEEDED; /* kernel out of memory */ case ERROR_ACCESS_DENIED: case ERROR_CANNOT_MAKE: ...
DoS
0
_dbus_win_error_from_last_error (void) { switch (GetLastError()) { case 0: return DBUS_ERROR_FAILED; case ERROR_NO_MORE_FILES: case ERROR_TOO_MANY_OPEN_FILES: return DBUS_ERROR_LIMITS_EXCEEDED; /* kernel out of memory */ case ERROR_ACCESS_DENIED: case ERROR_CANNOT_MAKE: ...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,032
_dbus_win_error_string (int error_number) { char *msg; FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_number, 0, (LPSTR) &msg, 0, NULL); if (msg[strlen (msg) - 1] == ...
DoS
0
_dbus_win_error_string (int error_number) { char *msg; FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_number, 0, (LPSTR) &msg, 0, NULL); if (msg[strlen (msg) - 1] == ...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,033
_dbus_windows_get_datadir (void) { return _dbus_replace_install_prefix(DBUS_DATADIR); }
DoS
0
_dbus_windows_get_datadir (void) { return _dbus_replace_install_prefix(DBUS_DATADIR); }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,034
_dbus_write_socket (int fd, const DBusString *buffer, int start, int len) { const char *data; int bytes_written; data = _dbus_string_get_const_data_len (buffer, start, len); again: _dbus_verbose ("send: len...
DoS
0
_dbus_write_socket (int fd, const DBusString *buffer, int start, int len) { const char *data; int bytes_written; data = _dbus_string_get_const_data_len (buffer, start, len); again: _dbus_verbose ("send: len...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,035
static void dump_backtrace_for_thread(HANDLE hThread) { STACKFRAME sf; CONTEXT context; DWORD dwImageType; if (!pStackWalk) if (!init_backtrace()) return; /* can't use this function for current thread as GetThreadContext * doesn't support getting context from current threa...
DoS
0
static void dump_backtrace_for_thread(HANDLE hThread) { STACKFRAME sf; CONTEXT context; DWORD dwImageType; if (!pStackWalk) if (!init_backtrace()) return; /* can't use this function for current thread as GetThreadContext * doesn't support getting context from current threa...
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,036
static dbus_uint32_t fromAscii(char ascii) { if(ascii >= '0' && ascii <= '9') return ascii - '0'; if(ascii >= 'A' && ascii <= 'F') return ascii - 'A' + 10; if(ascii >= 'a' && ascii <= 'f') return ascii - 'a' + 10; return 0; }
DoS
0
static dbus_uint32_t fromAscii(char ascii) { if(ascii >= '0' && ascii <= '9') return ascii - '0'; if(ascii >= 'A' && ascii <= 'F') return ascii - 'A' + 10; if(ascii >= 'a' && ascii <= 'f') return ascii - 'a' + 10; return 0; }
@@ -538,9 +538,12 @@ int _dbus_printf_string_upper_bound (const char *format, char buf[1024]; int bufsize; int len; + va_list args_copy; bufsize = sizeof (buf); - len = _vsnprintf (buf, bufsize - 1, format, args); + DBUS_VA_COPY (args_copy, args); + len = _vsnprintf (buf, bufsize - 1, format, args_cop...
CWE-20
null
null
3,037
static void ga_wait_child(pid_t pid, int *status, Error **err) { pid_t rpid; *status = 0; do { rpid = waitpid(pid, status, 0); } while (rpid == -1 && errno == EINTR); if (rpid == -1) { error_setg_errno(err, errno, "failed to wait for child (pid: %d)", pid); return; } ...
null
0
static void ga_wait_child(pid_t pid, int *status, Error **err) { pid_t rpid; *status = 0; do { rpid = waitpid(pid, status, 0); } while (rpid == -1 && errno == EINTR); if (rpid == -1) { error_setg_errno(err, errno, "failed to wait for child (pid: %d)", pid); return; } ...
@@ -18,6 +18,9 @@ #include <unistd.h> #include <errno.h> #include <fcntl.h> +#include <stdio.h> +#include <string.h> +#include <sys/stat.h> #include <inttypes.h> #include "qga/guest-agent-core.h" #include "qga-qmp-commands.h" @@ -237,9 +240,122 @@ static GuestFileHandle *guest_file_handle_find(int64_t id, Error *...
CWE-264
null
null
3,038
static int64_t guest_file_handle_add(FILE *fh, Error **errp) { GuestFileHandle *gfh; int64_t handle; handle = ga_get_fd_handle(ga_state, errp); if (error_is_set(errp)) { return 0; } gfh = g_malloc0(sizeof(GuestFileHandle)); gfh->id = handle; gfh->fh = fh; QTAILQ_INSERT_TAIL...
null
0
static int64_t guest_file_handle_add(FILE *fh, Error **errp) { GuestFileHandle *gfh; int64_t handle; handle = ga_get_fd_handle(ga_state, errp); if (error_is_set(errp)) { return 0; } gfh = g_malloc0(sizeof(GuestFileHandle)); gfh->id = handle; gfh->fh = fh; QTAILQ_INSERT_TAIL...
@@ -18,6 +18,9 @@ #include <unistd.h> #include <errno.h> #include <fcntl.h> +#include <stdio.h> +#include <string.h> +#include <sys/stat.h> #include <inttypes.h> #include "qga/guest-agent-core.h" #include "qga-qmp-commands.h" @@ -237,9 +240,122 @@ static GuestFileHandle *guest_file_handle_find(int64_t id, Error *...
CWE-264
null
null
3,039
static GuestFileHandle *guest_file_handle_find(int64_t id, Error **err) { GuestFileHandle *gfh; QTAILQ_FOREACH(gfh, &guest_file_state.filehandles, next) { if (gfh->id == id) { return gfh; } } error_setg(err, "handle '%" PRId64 "' has not been found", id); return NUL...
null
0
static GuestFileHandle *guest_file_handle_find(int64_t id, Error **err) { GuestFileHandle *gfh; QTAILQ_FOREACH(gfh, &guest_file_state.filehandles, next) { if (gfh->id == id) { return gfh; } } error_setg(err, "handle '%" PRId64 "' has not been found", id); return NUL...
@@ -18,6 +18,9 @@ #include <unistd.h> #include <errno.h> #include <fcntl.h> +#include <stdio.h> +#include <string.h> +#include <sys/stat.h> #include <inttypes.h> #include "qga/guest-agent-core.h" #include "qga-qmp-commands.h" @@ -237,9 +240,122 @@ static GuestFileHandle *guest_file_handle_find(int64_t id, Error *...
CWE-264
null
null
3,040
int64_t qmp_guest_get_time(Error **errp) { int ret; qemu_timeval tq; int64_t time_ns; ret = qemu_gettimeofday(&tq); if (ret < 0) { error_setg_errno(errp, errno, "Failed to get time"); return -1; } time_ns = tq.tv_sec * 1000000000LL + tq.tv_usec * 1000; return time_ns; }
null
0
int64_t qmp_guest_get_time(Error **errp) { int ret; qemu_timeval tq; int64_t time_ns; ret = qemu_gettimeofday(&tq); if (ret < 0) { error_setg_errno(errp, errno, "Failed to get time"); return -1; } time_ns = tq.tv_sec * 1000000000LL + tq.tv_usec * 1000; return time_ns; }
@@ -18,6 +18,9 @@ #include <unistd.h> #include <errno.h> #include <fcntl.h> +#include <stdio.h> +#include <string.h> +#include <sys/stat.h> #include <inttypes.h> #include "qga/guest-agent-core.h" #include "qga-qmp-commands.h" @@ -237,9 +240,122 @@ static GuestFileHandle *guest_file_handle_find(int64_t id, Error *...
CWE-264
null
null
3,041
void qmp_guest_set_time(int64_t time_ns, Error **errp) { int ret; int status; pid_t pid; Error *local_err = NULL; struct timeval tv; /* year-2038 will overflow in case time_t is 32bit */ if (time_ns / 1000000000 != (time_t)(time_ns / 1000000000)) { error_setg(errp, "Time %" PRId64 "...
null
0
void qmp_guest_set_time(int64_t time_ns, Error **errp) { int ret; int status; pid_t pid; Error *local_err = NULL; struct timeval tv; /* year-2038 will overflow in case time_t is 32bit */ if (time_ns / 1000000000 != (time_t)(time_ns / 1000000000)) { error_setg(errp, "Time %" PRId64 "...
@@ -18,6 +18,9 @@ #include <unistd.h> #include <errno.h> #include <fcntl.h> +#include <stdio.h> +#include <string.h> +#include <sys/stat.h> #include <inttypes.h> #include "qga/guest-agent-core.h" #include "qga-qmp-commands.h" @@ -237,9 +240,122 @@ static GuestFileHandle *guest_file_handle_find(int64_t id, Error *...
CWE-264
null
null
3,042
void qmp_guest_shutdown(bool has_mode, const char *mode, Error **err) { const char *shutdown_flag; Error *local_err = NULL; pid_t pid; int status; slog("guest-shutdown called, mode: %s", mode); if (!has_mode || strcmp(mode, "powerdown") == 0) { shutdown_flag = "-P"; } else if (strcm...
null
0
void qmp_guest_shutdown(bool has_mode, const char *mode, Error **err) { const char *shutdown_flag; Error *local_err = NULL; pid_t pid; int status; slog("guest-shutdown called, mode: %s", mode); if (!has_mode || strcmp(mode, "powerdown") == 0) { shutdown_flag = "-P"; } else if (strcm...
@@ -18,6 +18,9 @@ #include <unistd.h> #include <errno.h> #include <fcntl.h> +#include <stdio.h> +#include <string.h> +#include <sys/stat.h> #include <inttypes.h> #include "qga/guest-agent-core.h" #include "qga-qmp-commands.h" @@ -237,9 +240,122 @@ static GuestFileHandle *guest_file_handle_find(int64_t id, Error *...
CWE-264
null
null
3,043
static gboolean channel_event_cb(GIOCondition condition, gpointer data) { GAState *s = data; gchar buf[QGA_READ_COUNT_DEFAULT+1]; gsize count; GError *err = NULL; GIOStatus status = ga_channel_read(s->channel, buf, QGA_READ_COUNT_DEFAULT, &count); if (err != NULL) { g_warning("error read...
null
0
static gboolean channel_event_cb(GIOCondition condition, gpointer data) { GAState *s = data; gchar buf[QGA_READ_COUNT_DEFAULT+1]; gsize count; GError *err = NULL; GIOStatus status = ga_channel_read(s->channel, buf, QGA_READ_COUNT_DEFAULT, &count); if (err != NULL) { g_warning("error read...
@@ -478,7 +478,7 @@ static void become_daemon(const char *pidfile) } } - umask(0); + umask(S_IRWXG | S_IRWXO); sid = setsid(); if (sid < 0) { goto fail;
CWE-264
null
null
3,044
static gboolean channel_init(GAState *s, const gchar *method, const gchar *path) { GAChannelMethod channel_method; if (method == NULL) { method = "virtio-serial"; } if (path == NULL) { if (strcmp(method, "virtio-serial") != 0) { g_critical("must specify a path for this chan...
null
0
static gboolean channel_init(GAState *s, const gchar *method, const gchar *path) { GAChannelMethod channel_method; if (method == NULL) { method = "virtio-serial"; } if (path == NULL) { if (strcmp(method, "virtio-serial") != 0) { g_critical("must specify a path for this chan...
@@ -478,7 +478,7 @@ static void become_daemon(const char *pidfile) } } - umask(0); + umask(S_IRWXG | S_IRWXO); sid = setsid(); if (sid < 0) { goto fail;
CWE-264
null
null
3,045
static bool ga_create_file(const char *path) { int fd = open(path, O_CREAT | O_WRONLY, S_IWUSR | S_IRUSR); if (fd == -1) { g_warning("unable to open/create file %s: %s", path, strerror(errno)); return false; } close(fd); return true; }
null
0
static bool ga_create_file(const char *path) { int fd = open(path, O_CREAT | O_WRONLY, S_IWUSR | S_IRUSR); if (fd == -1) { g_warning("unable to open/create file %s: %s", path, strerror(errno)); return false; } close(fd); return true; }
@@ -478,7 +478,7 @@ static void become_daemon(const char *pidfile) } } - umask(0); + umask(S_IRWXG | S_IRWXO); sid = setsid(); if (sid < 0) { goto fail;
CWE-264
null
null
3,046
static bool ga_delete_file(const char *path) { int ret = unlink(path); if (ret == -1) { g_warning("unable to delete file: %s: %s", path, strerror(errno)); return false; } return true; }
null
0
static bool ga_delete_file(const char *path) { int ret = unlink(path); if (ret == -1) { g_warning("unable to delete file: %s: %s", path, strerror(errno)); return false; } return true; }
@@ -478,7 +478,7 @@ static void become_daemon(const char *pidfile) } } - umask(0); + umask(S_IRWXG | S_IRWXO); sid = setsid(); if (sid < 0) { goto fail;
CWE-264
null
null
3,047
void ga_disable_logging(GAState *s) { s->logging_enabled = false; }
null
0
void ga_disable_logging(GAState *s) { s->logging_enabled = false; }
@@ -478,7 +478,7 @@ static void become_daemon(const char *pidfile) } } - umask(0); + umask(S_IRWXG | S_IRWXO); sid = setsid(); if (sid < 0) { goto fail;
CWE-264
null
null
3,048
static void ga_disable_non_whitelisted(void) { char **list_head, **list; bool whitelisted; int i; list_head = list = qmp_get_command_list(); while (*list != NULL) { whitelisted = false; i = 0; while (ga_freeze_whitelist[i] != NULL) { if (strcmp(*list, ga_freeze_w...
null
0
static void ga_disable_non_whitelisted(void) { char **list_head, **list; bool whitelisted; int i; list_head = list = qmp_get_command_list(); while (*list != NULL) { whitelisted = false; i = 0; while (ga_freeze_whitelist[i] != NULL) { if (strcmp(*list, ga_freeze_w...
@@ -478,7 +478,7 @@ static void become_daemon(const char *pidfile) } } - umask(0); + umask(S_IRWXG | S_IRWXO); sid = setsid(); if (sid < 0) { goto fail;
CWE-264
null
null
3,049
void ga_enable_logging(GAState *s) { s->logging_enabled = true; }
null
0
void ga_enable_logging(GAState *s) { s->logging_enabled = true; }
@@ -478,7 +478,7 @@ static void become_daemon(const char *pidfile) } } - umask(0); + umask(S_IRWXG | S_IRWXO); sid = setsid(); if (sid < 0) { goto fail;
CWE-264
null
null
3,050
static void ga_enable_non_blacklisted(GList *blacklist) { char **list_head, **list; list_head = list = qmp_get_command_list(); while (*list != NULL) { if (g_list_find_custom(blacklist, *list, ga_strcmp) == NULL && !qmp_command_is_enabled(*list)) { g_debug("enabling command: ...
null
0
static void ga_enable_non_blacklisted(GList *blacklist) { char **list_head, **list; list_head = list = qmp_get_command_list(); while (*list != NULL) { if (g_list_find_custom(blacklist, *list, ga_strcmp) == NULL && !qmp_command_is_enabled(*list)) { g_debug("enabling command: ...
@@ -478,7 +478,7 @@ static void become_daemon(const char *pidfile) } } - umask(0); + umask(S_IRWXG | S_IRWXO); sid = setsid(); if (sid < 0) { goto fail;
CWE-264
null
null
3,051
const char *ga_fsfreeze_hook(GAState *s) { return s->fsfreeze_hook; }
null
0
const char *ga_fsfreeze_hook(GAState *s) { return s->fsfreeze_hook; }
@@ -478,7 +478,7 @@ static void become_daemon(const char *pidfile) } } - umask(0); + umask(S_IRWXG | S_IRWXO); sid = setsid(); if (sid < 0) { goto fail;
CWE-264
null
null
3,052
int64_t ga_get_fd_handle(GAState *s, Error **errp) { int64_t handle; g_assert(s->pstate_filepath); /* we blacklist commands and avoid operations that potentially require * writing to disk when we're in a frozen state. this includes opening * new files, so we should never get here in that situatio...
null
0
int64_t ga_get_fd_handle(GAState *s, Error **errp) { int64_t handle; g_assert(s->pstate_filepath); /* we blacklist commands and avoid operations that potentially require * writing to disk when we're in a frozen state. this includes opening * new files, so we should never get here in that situatio...
@@ -478,7 +478,7 @@ static void become_daemon(const char *pidfile) } } - umask(0); + umask(S_IRWXG | S_IRWXO); sid = setsid(); if (sid < 0) { goto fail;
CWE-264
null
null
3,053
svc_dg_enable_pktinfo(int fd, const struct __rpc_sockinfo *si) { int val = 1; switch (si->si_af) { case AF_INET: (void) setsockopt(fd, SOL_IP, IP_PKTINFO, &val, sizeof(val)); break; #ifdef INET6 case AF_INET6: (void) setsockopt(fd, SOL_IPV6, IPV6_RECVPKTINFO, &val, sizeof(val)); break; #endif } }
DoS
0
svc_dg_enable_pktinfo(int fd, const struct __rpc_sockinfo *si) { int val = 1; switch (si->si_af) { case AF_INET: (void) setsockopt(fd, SOL_IP, IP_PKTINFO, &val, sizeof(val)); break; #ifdef INET6 case AF_INET6: (void) setsockopt(fd, SOL_IPV6, IPV6_RECVPKTINFO, &val, sizeof(val)); break; #endif } }
@@ -284,7 +284,6 @@ svc_dg_getargs(xprt, xdr_args, args_ptr) { if (! SVCAUTH_UNWRAP(xprt->xp_auth, &(su_data(xprt)->su_xdrs), xdr_args, args_ptr)) { - (void)svc_freeargs(xprt, xdr_args, args_ptr); return FALSE; } return TRUE;
CWE-399
null
null
3,054
svc_dg_valid_pktinfo(struct msghdr *msg) { struct cmsghdr *cmsg; if (!msg->msg_name) return 0; if (msg->msg_flags & MSG_CTRUNC) return 0; cmsg = CMSG_FIRSTHDR(msg); if (cmsg == NULL || CMSG_NXTHDR(msg, cmsg) != NULL) return 0; switch (((struct sockaddr *) msg->msg_name)->sa_family) { case AF_INET: if...
DoS
0
svc_dg_valid_pktinfo(struct msghdr *msg) { struct cmsghdr *cmsg; if (!msg->msg_name) return 0; if (msg->msg_flags & MSG_CTRUNC) return 0; cmsg = CMSG_FIRSTHDR(msg); if (cmsg == NULL || CMSG_NXTHDR(msg, cmsg) != NULL) return 0; switch (((struct sockaddr *) msg->msg_name)->sa_family) { case AF_INET: if...
@@ -284,7 +284,6 @@ svc_dg_getargs(xprt, xdr_args, args_ptr) { if (! SVCAUTH_UNWRAP(xprt->xp_auth, &(su_data(xprt)->su_xdrs), xdr_args, args_ptr)) { - (void)svc_freeargs(xprt, xdr_args, args_ptr); return FALSE; } return TRUE;
CWE-399
null
null
3,055
xmlNsPtr attr_find_ns(xmlAttrPtr node) { if (node->ns) { return node->ns; } else if (node->parent->ns) { return node->parent->ns; } else { return xmlSearchNs(node->doc, node->parent, NULL); } }
+Info
0
xmlNsPtr attr_find_ns(xmlAttrPtr node) { if (node->ns) { return node->ns; } else if (node->parent->ns) { return node->parent->ns; } else { return xmlSearchNs(node->doc, node->parent, NULL); } }
@@ -92,7 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { ctxt->keepBlanks = 0; - ctxt->options -= XML_PARSE_DTDLOAD; + ctxt->options &= ~XML_PARSE_DTDLOAD; ctxt->sax->i...
CWE-200
null
null
3,056
static void cleanup_xml_node(xmlNodePtr node) { xmlNodePtr trav; xmlNodePtr del = NULL; trav = node->children; while (trav != NULL) { if (del != NULL) { xmlUnlinkNode(del); xmlFreeNode(del); del = NULL; } if (trav->type == XML_TEXT_NODE) { if (is_blank(trav->content)) { del = trav; } } e...
+Info
0
static void cleanup_xml_node(xmlNodePtr node) { xmlNodePtr trav; xmlNodePtr del = NULL; trav = node->children; while (trav != NULL) { if (del != NULL) { xmlUnlinkNode(del); xmlFreeNode(del); del = NULL; } if (trav->type == XML_TEXT_NODE) { if (is_blank(trav->content)) { del = trav; } } e...
@@ -92,7 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { ctxt->keepBlanks = 0; - ctxt->options -= XML_PARSE_DTDLOAD; + ctxt->options &= ~XML_PARSE_DTDLOAD; ctxt->sax->i...
CWE-200
null
null
3,057
xmlNodePtr get_node_ex(xmlNodePtr node, char *name, char *ns) { while (node!=NULL) { if (node_is_equal_ex(node, name, ns)) { return node; } node = node->next; } return NULL; }
+Info
0
xmlNodePtr get_node_ex(xmlNodePtr node, char *name, char *ns) { while (node!=NULL) { if (node_is_equal_ex(node, name, ns)) { return node; } node = node->next; } return NULL; }
@@ -92,7 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { ctxt->keepBlanks = 0; - ctxt->options -= XML_PARSE_DTDLOAD; + ctxt->options &= ~XML_PARSE_DTDLOAD; ctxt->sax->i...
CWE-200
null
null
3,058
xmlNodePtr get_node_recurisve_ex(xmlNodePtr node, char *name, char *ns) { while (node != NULL) { if (node_is_equal_ex(node, name, ns)) { return node; } else if (node->children != NULL) { xmlNodePtr tmp = get_node_recurisve_ex(node->children, name, ns); if (tmp) { return tmp; } } node = node->ne...
+Info
0
xmlNodePtr get_node_recurisve_ex(xmlNodePtr node, char *name, char *ns) { while (node != NULL) { if (node_is_equal_ex(node, name, ns)) { return node; } else if (node->children != NULL) { xmlNodePtr tmp = get_node_recurisve_ex(node->children, name, ns); if (tmp) { return tmp; } } node = node->ne...
@@ -92,7 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { ctxt->keepBlanks = 0; - ctxt->options -= XML_PARSE_DTDLOAD; + ctxt->options &= ~XML_PARSE_DTDLOAD; ctxt->sax->i...
CWE-200
null
null
3,059
xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns) { xmlAttrPtr attr; while (node != NULL) { if (name != NULL) { node = get_node_ex(node, name, name_ns); if (node==NULL) { return NULL; } } attr = get_attribute_ex(node->pr...
+Info
0
xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns) { xmlAttrPtr attr; while (node != NULL) { if (name != NULL) { node = get_node_ex(node, name, name_ns); if (node==NULL) { return NULL; } } attr = get_attribute_ex(node->pr...
@@ -92,7 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { ctxt->keepBlanks = 0; - ctxt->options -= XML_PARSE_DTDLOAD; + ctxt->options &= ~XML_PARSE_DTDLOAD; ctxt->sax->i...
CWE-200
null
null
3,060
static int is_blank(const xmlChar* str) { while (*str != '\0') { if (*str != ' ' && *str != 0x9 && *str != 0xa && *str != 0xd) { return 0; } str++; } return 1; }
+Info
0
static int is_blank(const xmlChar* str) { while (*str != '\0') { if (*str != ' ' && *str != 0x9 && *str != 0xa && *str != 0xd) { return 0; } str++; } return 1; }
@@ -92,7 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { ctxt->keepBlanks = 0; - ctxt->options -= XML_PARSE_DTDLOAD; + ctxt->options &= ~XML_PARSE_DTDLOAD; ctxt->sax->i...
CWE-200
null
null
3,061
int node_is_equal_ex(xmlNodePtr node, char *name, char *ns) { if (name == NULL || strcmp((char*)node->name, name) == 0) { if (ns) { xmlNsPtr nsPtr = node_find_ns(node); if (nsPtr) { return (strcmp((char*)nsPtr->href, ns) == 0); } else { return FALSE; } } return TRUE; } return FALSE; }
+Info
0
int node_is_equal_ex(xmlNodePtr node, char *name, char *ns) { if (name == NULL || strcmp((char*)node->name, name) == 0) { if (ns) { xmlNsPtr nsPtr = node_find_ns(node); if (nsPtr) { return (strcmp((char*)nsPtr->href, ns) == 0); } else { return FALSE; } } return TRUE; } return FALSE; }
@@ -92,7 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { ctxt->keepBlanks = 0; - ctxt->options -= XML_PARSE_DTDLOAD; + ctxt->options &= ~XML_PARSE_DTDLOAD; ctxt->sax->i...
CWE-200
null
null
3,062
int parse_namespace(const xmlChar *inval, char **value, char **namespace) { char *found = strrchr((char*)inval, ':'); if (found != NULL && found != (char*)inval) { (*namespace) = estrndup((char*)inval, found - (char*)inval); (*value) = estrdup(++found); } else { (*value) = estrdup((char*)inval); (*namespace...
+Info
0
int parse_namespace(const xmlChar *inval, char **value, char **namespace) { char *found = strrchr((char*)inval, ':'); if (found != NULL && found != (char*)inval) { (*namespace) = estrndup((char*)inval, found - (char*)inval); (*value) = estrdup(++found); } else { (*value) = estrdup((char*)inval); (*namespace...
@@ -92,7 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { ctxt->keepBlanks = 0; - ctxt->options -= XML_PARSE_DTDLOAD; + ctxt->options &= ~XML_PARSE_DTDLOAD; ctxt->sax->i...
CWE-200
null
null
3,063
int php_stream_xmlIO_match_wrapper(const char *filename) { TSRMLS_FETCH(); return php_stream_locate_url_wrapper(filename, NULL, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC) ? 1 : 0; }
+Info
0
int php_stream_xmlIO_match_wrapper(const char *filename) { TSRMLS_FETCH(); return php_stream_locate_url_wrapper(filename, NULL, STREAM_LOCATE_WRAPPERS_ONLY TSRMLS_CC) ? 1 : 0; }
@@ -92,7 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { ctxt->keepBlanks = 0; - ctxt->options -= XML_PARSE_DTDLOAD; + ctxt->options &= ~XML_PARSE_DTDLOAD; ctxt->sax->i...
CWE-200
null
null
3,064
void *php_stream_xmlIO_open_wrapper(const char *filename) { TSRMLS_FETCH(); return php_stream_open_wrapper((char*)filename, "rb", ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL); }
+Info
0
void *php_stream_xmlIO_open_wrapper(const char *filename) { TSRMLS_FETCH(); return php_stream_open_wrapper((char*)filename, "rb", ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL); }
@@ -92,7 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { ctxt->keepBlanks = 0; - ctxt->options -= XML_PARSE_DTDLOAD; + ctxt->options &= ~XML_PARSE_DTDLOAD; ctxt->sax->i...
CWE-200
null
null
3,065
static void soap_Comment(void *ctx, const xmlChar *value) { }
+Info
0
static void soap_Comment(void *ctx, const xmlChar *value) { }
@@ -92,7 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { ctxt->keepBlanks = 0; - ctxt->options -= XML_PARSE_DTDLOAD; + ctxt->options &= ~XML_PARSE_DTDLOAD; ctxt->sax->i...
CWE-200
null
null
3,066
static void soap_ignorableWhitespace(void *ctx, const xmlChar *ch, int len) { }
+Info
0
static void soap_ignorableWhitespace(void *ctx, const xmlChar *ch, int len) { }
@@ -92,7 +92,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC) PG(allow_url_fopen) = old_allow_url_fopen; if (ctxt) { ctxt->keepBlanks = 0; - ctxt->options -= XML_PARSE_DTDLOAD; + ctxt->options &= ~XML_PARSE_DTDLOAD; ctxt->sax->i...
CWE-200
null
null
3,067
static void make_default_cur_rule(void) { memset(&G.cur_rule, 0, sizeof(G.cur_rule)); G.cur_rule.maj = -1; /* "not a @major,minor rule" */ G.cur_rule.mode = 0660; }
null
0
static void make_default_cur_rule(void) { memset(&G.cur_rule, 0, sizeof(G.cur_rule)); G.cur_rule.maj = -1; /* "not a @major,minor rule" */ G.cur_rule.mode = 0660; }
@@ -429,6 +429,18 @@ static const struct rule *next_rule(void) #endif +static void mkdir_recursive(char *name) +{ + /* if name has many levels ("dir1/dir2"), + * bb_make_directory() will create dir1 according to umask, + * not according to its "mode" parameter. + * Since we run with umask=0, need to temporarily...
CWE-264
null
null
3,068
static const struct rule *next_rule(void) { struct rule *rule; /* Open conf file if we didn't do it yet */ if (!G.parser && G.filename) { dbg("config_open('%s')", G.filename); G.parser = config_open2(G.filename, fopen_for_read); G.filename = NULL; } if (G.rule_vec) { /* mdev -s */ /* Do we have rule pa...
null
0
static const struct rule *next_rule(void) { struct rule *rule; /* Open conf file if we didn't do it yet */ if (!G.parser && G.filename) { dbg("config_open('%s')", G.filename); G.parser = config_open2(G.filename, fopen_for_read); G.filename = NULL; } if (G.rule_vec) { /* mdev -s */ /* Do we have rule pa...
@@ -429,6 +429,18 @@ static const struct rule *next_rule(void) #endif +static void mkdir_recursive(char *name) +{ + /* if name has many levels ("dir1/dir2"), + * bb_make_directory() will create dir1 according to umask, + * not according to its "mode" parameter. + * Since we run with umask=0, need to temporarily...
CWE-264
null
null
3,069
static void parse_next_rule(void) { /* Note: on entry, G.cur_rule is set to default */ while (1) { char *tokens[4]; char *val; /* No PARSE_EOL_COMMENTS, because command may contain '#' chars */ if (!config_read(G.parser, tokens, 4, 3, "# \t", PARSE_NORMAL & ~PARSE_EOL_COMMENTS)) break; /* Fields: [-]re...
null
0
static void parse_next_rule(void) { /* Note: on entry, G.cur_rule is set to default */ while (1) { char *tokens[4]; char *val; /* No PARSE_EOL_COMMENTS, because command may contain '#' chars */ if (!config_read(G.parser, tokens, 4, 3, "# \t", PARSE_NORMAL & ~PARSE_EOL_COMMENTS)) break; /* Fields: [-]re...
@@ -429,6 +429,18 @@ static const struct rule *next_rule(void) #endif +static void mkdir_recursive(char *name) +{ + /* if name has many levels ("dir1/dir2"), + * bb_make_directory() will create dir1 according to umask, + * not according to its "mode" parameter. + * Since we run with umask=0, need to temporarily...
CWE-264
null
null
3,070
_asn1_add_static_node (unsigned int type) { list_type *listElement; asn1_node punt; punt = calloc (1, sizeof (struct asn1_node_st)); if (punt == NULL) return NULL; listElement = malloc (sizeof (list_type)); if (listElement == NULL) { free (punt); return NULL; } listElement->node...
Overflow
0
_asn1_add_static_node (unsigned int type) { list_type *listElement; asn1_node punt; punt = calloc (1, sizeof (struct asn1_node_st)); if (punt == NULL) return NULL; listElement = malloc (sizeof (list_type)); if (listElement == NULL) { free (punt); return NULL; } listElement->node...
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,071
_asn1_change_integer_value (asn1_node node) { asn1_node p; unsigned char val[SIZEOF_UNSIGNED_LONG_INT]; unsigned char val2[SIZEOF_UNSIGNED_LONG_INT + 1]; int len; if (node == NULL) return ASN1_ELEMENT_NOT_FOUND; p = node; while (p) { if ((type_field (p->type) == ASN1_ETYPE_INTEGER) && (...
Overflow
0
_asn1_change_integer_value (asn1_node node) { asn1_node p; unsigned char val[SIZEOF_UNSIGNED_LONG_INT]; unsigned char val2[SIZEOF_UNSIGNED_LONG_INT + 1]; int len; if (node == NULL) return ASN1_ELEMENT_NOT_FOUND; p = node; while (p) { if ((type_field (p->type) == ASN1_ETYPE_INTEGER) && (...
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,072
_asn1_check_identifier (asn1_node node) { asn1_node p, p2; char name2[ASN1_MAX_NAME_SIZE * 2 + 2]; if (node == NULL) return ASN1_ELEMENT_NOT_FOUND; p = node; while (p) { if (p->value && type_field (p->type) == ASN1_ETYPE_IDENTIFIER) { _asn1_str_cpy (name2, sizeof (name2), node->name); _...
Overflow
0
_asn1_check_identifier (asn1_node node) { asn1_node p, p2; char name2[ASN1_MAX_NAME_SIZE * 2 + 2]; if (node == NULL) return ASN1_ELEMENT_NOT_FOUND; p = node; while (p) { if (p->value && type_field (p->type) == ASN1_ETYPE_IDENTIFIER) { _asn1_str_cpy (name2, sizeof (name2), node->name); _...
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,073
_asn1_cpy_name (asn1_node dst, asn1_node src) { if (dst == NULL) return dst; if (src == NULL) { dst->name[0] = 0; dst->name_hash = hash_pjw_bare (dst->name, 0); return dst; } _asn1_str_cpy (dst->name, sizeof (dst->name), src->name); dst->name_hash = src->name_hash; return dst;...
Overflow
0
_asn1_cpy_name (asn1_node dst, asn1_node src) { if (dst == NULL) return dst; if (src == NULL) { dst->name[0] = 0; dst->name_hash = hash_pjw_bare (dst->name, 0); return dst; } _asn1_str_cpy (dst->name, sizeof (dst->name), src->name); dst->name_hash = src->name_hash; return dst;...
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,074
_asn1_delete_list (void) { list_type *listElement; while (firstElement) { listElement = firstElement; firstElement = firstElement->next; free (listElement); } }
Overflow
0
_asn1_delete_list (void) { list_type *listElement; while (firstElement) { listElement = firstElement; firstElement = firstElement->next; free (listElement); } }
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,075
_asn1_delete_list_and_nodes (void) { list_type *listElement; while (firstElement) { listElement = firstElement; firstElement = firstElement->next; _asn1_remove_node (listElement->node, 0); free (listElement); } }
Overflow
0
_asn1_delete_list_and_nodes (void) { list_type *listElement; while (firstElement) { listElement = firstElement; firstElement = firstElement->next; _asn1_remove_node (listElement->node, 0); free (listElement); } }
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,076
_asn1_expand_object_id (asn1_node node) { asn1_node p, p2, p3, p4, p5; char name_root[ASN1_MAX_NAME_SIZE], name2[2 * ASN1_MAX_NAME_SIZE + 1]; int move, tlen; if (node == NULL) return ASN1_ELEMENT_NOT_FOUND; _asn1_str_cpy (name_root, sizeof (name_root), node->name); p = node; move = DOWN; while (...
Overflow
0
_asn1_expand_object_id (asn1_node node) { asn1_node p, p2, p3, p4, p5; char name_root[ASN1_MAX_NAME_SIZE], name2[2 * ASN1_MAX_NAME_SIZE + 1]; int move, tlen; if (node == NULL) return ASN1_ELEMENT_NOT_FOUND; _asn1_str_cpy (name_root, sizeof (name_root), node->name); p = node; move = DOWN; while (...
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,077
_asn1_set_default_tag (asn1_node node) { asn1_node p; if ((node == NULL) || (type_field (node->type) != ASN1_ETYPE_DEFINITIONS)) return ASN1_ELEMENT_NOT_FOUND; p = node; while (p) { if ((type_field (p->type) == ASN1_ETYPE_TAG) && !(p->type & CONST_EXPLICIT) && !(p->type & CONST_IMPLICIT)) { ...
Overflow
0
_asn1_set_default_tag (asn1_node node) { asn1_node p; if ((node == NULL) || (type_field (node->type) != ASN1_ETYPE_DEFINITIONS)) return ASN1_ELEMENT_NOT_FOUND; p = node; while (p) { if ((type_field (p->type) == ASN1_ETYPE_TAG) && !(p->type & CONST_EXPLICIT) && !(p->type & CONST_IMPLICIT)) { ...
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,078
_asn1_set_name (asn1_node node, const char *name) { unsigned int nsize; if (node == NULL) return node; if (name == NULL) { node->name[0] = 0; node->name_hash = hash_pjw_bare (node->name, 0); return node; } nsize = _asn1_str_cpy (node->name, sizeof (node->name), name); node->na...
Overflow
0
_asn1_set_name (asn1_node node, const char *name) { unsigned int nsize; if (node == NULL) return node; if (name == NULL) { node->name[0] = 0; node->name_hash = hash_pjw_bare (node->name, 0); return node; } nsize = _asn1_str_cpy (node->name, sizeof (node->name), name); node->na...
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,079
_asn1_set_right (asn1_node node, asn1_node right) { if (node == NULL) return node; node->right = right; if (right) { right->left = node; if (right->up == NULL) right->up = node->up; } return node; }
Overflow
0
_asn1_set_right (asn1_node node, asn1_node right) { if (node == NULL) return node; node->right = right; if (right) { right->left = node; if (right->up == NULL) right->up = node->up; } return node; }
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,080
_asn1_set_value (asn1_node node, const void *value, unsigned int len) { if (node == NULL) return node; if (node->value) { if (node->value != node->small_value) free (node->value); node->value = NULL; node->value_len = 0; } if (!len) return node; if (len < sizeof (node->small...
Overflow
0
_asn1_set_value (asn1_node node, const void *value, unsigned int len) { if (node == NULL) return node; if (node->value) { if (node->value != node->small_value) free (node->value); node->value = NULL; node->value_len = 0; } if (!len) return node; if (len < sizeof (node->small...
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,081
_asn1_set_value_lv (asn1_node node, const void *value, unsigned int len) { int len2; void *temp; if (node == NULL) return node; asn1_length_der (len, NULL, &len2); temp = malloc (len + len2); if (temp == NULL) return NULL; asn1_octet_der (value, len, temp, &len2); return _asn1_set_value_m (no...
Overflow
0
_asn1_set_value_lv (asn1_node node, const void *value, unsigned int len) { int len2; void *temp; if (node == NULL) return node; asn1_length_der (len, NULL, &len2); temp = malloc (len + len2); if (temp == NULL) return NULL; asn1_octet_der (value, len, temp, &len2); return _asn1_set_value_m (no...
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,082
_asn1_set_value_m (asn1_node node, void *value, unsigned int len) { if (node == NULL) return node; if (node->value) { if (node->value != node->small_value) free (node->value); node->value = NULL; node->value_len = 0; } if (!len) return node; node->value = value; node->val...
Overflow
0
_asn1_set_value_m (asn1_node node, void *value, unsigned int len) { if (node == NULL) return node; if (node->value) { if (node->value != node->small_value) free (node->value); node->value = NULL; node->value_len = 0; } if (!len) return node; node->value = value; node->val...
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,083
_asn1_type_set_config (asn1_node node) { asn1_node p, p2; int move; if (node == NULL) return ASN1_ELEMENT_NOT_FOUND; p = node; move = DOWN; while (!((p == node) && (move == UP))) { if (move != UP) { if (type_field (p->type) == ASN1_ETYPE_SET) { p2 = p->down; while (p2...
Overflow
0
_asn1_type_set_config (asn1_node node) { asn1_node p, p2; int move; if (node == NULL) return ASN1_ELEMENT_NOT_FOUND; p = node; move = DOWN; while (!((p == node) && (move == UP))) { if (move != UP) { if (type_field (p->type) == ASN1_ETYPE_SET) { p2 = p->down; while (p2...
@@ -543,7 +543,7 @@ _asn1_delete_list_and_nodes (void) char * -_asn1_ltostr (long v, char *str) +_asn1_ltostr (long v, char str[LTOSTR_MAX_SIZE]) { long d, r; char temp[LTOSTR_MAX_SIZE]; @@ -567,7 +567,7 @@ _asn1_ltostr (long v, char *str) count++; v = d; } - while (v); + while (v && ((...
CWE-119
null
null
3,084
ASCIIHexEncoder::ASCIIHexEncoder(Stream *strA): FilterStream(strA) { bufPtr = bufEnd = buf; lineLen = 0; eof = gFalse; }
Overflow
0
ASCIIHexEncoder::ASCIIHexEncoder(Stream *strA): FilterStream(strA) { bufPtr = bufEnd = buf; lineLen = 0; eof = gFalse; }
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,085
ASCIIHexStream::ASCIIHexStream(Stream *strA): FilterStream(strA) { buf = EOF; eof = gFalse; }
Overflow
0
ASCIIHexStream::ASCIIHexStream(Stream *strA): FilterStream(strA) { buf = EOF; eof = gFalse; }
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,086
BaseStream::BaseStream(Object *dictA, Guint lengthA) { dict = *dictA; length = lengthA; }
Overflow
0
BaseStream::BaseStream(Object *dictA, Guint lengthA) { dict = *dictA; length = lengthA; }
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,087
BufStream::BufStream(Stream *strA, int bufSizeA): FilterStream(strA) { bufSize = bufSizeA; buf = (int *)gmallocn(bufSize, sizeof(int)); }
Overflow
0
BufStream::BufStream(Stream *strA, int bufSizeA): FilterStream(strA) { bufSize = bufSizeA; buf = (int *)gmallocn(bufSize, sizeof(int)); }
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,088
CCITTFaxStream::CCITTFaxStream(Stream *strA, int encodingA, GBool endOfLineA, GBool byteAlignA, int columnsA, int rowsA, GBool endOfBlockA, GBool blackA): FilterStream(strA) { encoding = encodingA; endOfLine = endOfLineA; byteAlign = byteAlignA; columns = columnsA; if (columns < 1) { ...
Overflow
0
CCITTFaxStream::CCITTFaxStream(Stream *strA, int encodingA, GBool endOfLineA, GBool byteAlignA, int columnsA, int rowsA, GBool endOfBlockA, GBool blackA): FilterStream(strA) { encoding = encodingA; endOfLine = endOfLineA; byteAlign = byteAlignA; columns = columnsA; if (columns < 1) { ...
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,089
CMYKGrayEncoder::CMYKGrayEncoder(Stream *strA): FilterStream(strA) { bufPtr = bufEnd = buf; eof = gFalse; }
Overflow
0
CMYKGrayEncoder::CMYKGrayEncoder(Stream *strA): FilterStream(strA) { bufPtr = bufEnd = buf; eof = gFalse; }
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,090
CachedFileStream::CachedFileStream(CachedFile *ccA, Guint startA, GBool limitedA, Guint lengthA, Object *dictA) : BaseStream(dictA, lengthA) { cc = ccA; start = startA; limited = limitedA; length = lengthA; bufPtr = bufEnd = buf; bufPos = start; savePos = 0; saved = gFalse; }
Overflow
0
CachedFileStream::CachedFileStream(CachedFile *ccA, Guint startA, GBool limitedA, Guint lengthA, Object *dictA) : BaseStream(dictA, lengthA) { cc = ccA; start = startA; limited = limitedA; length = lengthA; bufPtr = bufEnd = buf; bufPos = start; savePos = 0; saved = gFalse; }
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,091
DCTStream::DCTStream(Stream *strA, int colorXformA): FilterStream(strA) { int i, j; colorXform = colorXformA; progressive = interleaved = gFalse; width = height = 0; mcuWidth = mcuHeight = 0; numComps = 0; comp = 0; x = y = dy = 0; for (i = 0; i < 4; ++i) { for (j = 0; j < 32; ++j) { ro...
Overflow
0
DCTStream::DCTStream(Stream *strA, int colorXformA): FilterStream(strA) { int i, j; colorXform = colorXformA; progressive = interleaved = gFalse; width = height = 0; mcuWidth = mcuHeight = 0; numComps = 0; comp = 0; x = y = dy = 0; for (i = 0; i < 4; ++i) { for (j = 0; j < 32; ++j) { ro...
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,092
EOFStream::EOFStream(Stream *strA): FilterStream(strA) { }
Overflow
0
EOFStream::EOFStream(Stream *strA): FilterStream(strA) { }
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,093
EmbedStream::EmbedStream(Stream *strA, Object *dictA, GBool limitedA, Guint lengthA): BaseStream(dictA, lengthA) { str = strA; limited = limitedA; length = lengthA; }
Overflow
0
EmbedStream::EmbedStream(Stream *strA, Object *dictA, GBool limitedA, Guint lengthA): BaseStream(dictA, lengthA) { str = strA; limited = limitedA; length = lengthA; }
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,094
FileOutStream::FileOutStream (FILE* fa, Guint startA) { f = fa; start = startA; }
Overflow
0
FileOutStream::FileOutStream (FILE* fa, Guint startA) { f = fa; start = startA; }
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,095
FilterStream::FilterStream(Stream *strA) { str = strA; }
Overflow
0
FilterStream::FilterStream(Stream *strA) { str = strA; }
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,096
FixedLengthEncoder::FixedLengthEncoder(Stream *strA, int lengthA): FilterStream(strA) { length = lengthA; count = 0; }
Overflow
0
FixedLengthEncoder::FixedLengthEncoder(Stream *strA, int lengthA): FilterStream(strA) { length = lengthA; count = 0; }
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,097
ImageStream::ImageStream(Stream *strA, int widthA, int nCompsA, int nBitsA) { int imgLineSize; str = strA; width = widthA; nComps = nCompsA; nBits = nBitsA; nVals = width * nComps; inputLineSize = (nVals * nBits + 7) >> 3; if (nBits <= 0 || nVals > INT_MAX / nBits - 7) { inputLineSize = -1; } ...
Overflow
0
ImageStream::ImageStream(Stream *strA, int widthA, int nCompsA, int nBitsA) { int imgLineSize; str = strA; width = widthA; nComps = nCompsA; nBits = nBitsA; nVals = width * nComps; inputLineSize = (nVals * nBits + 7) >> 3; if (nBits <= 0 || nVals > INT_MAX / nBits - 7) { inputLineSize = -1; } ...
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,098
LZWStream::LZWStream(Stream *strA, int predictor, int columns, int colors, int bits, int earlyA): FilterStream(strA) { if (predictor != 1) { pred = new StreamPredictor(this, predictor, columns, colors, bits); if (!pred->isOk()) { delete pred; pred = NULL; } } else { pred = NUL...
Overflow
0
LZWStream::LZWStream(Stream *strA, int predictor, int columns, int colors, int bits, int earlyA): FilterStream(strA) { if (predictor != 1) { pred = new StreamPredictor(this, predictor, columns, colors, bits); if (!pred->isOk()) { delete pred; pred = NULL; } } else { pred = NUL...
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null
3,099
MemStream::MemStream(char *bufA, Guint startA, Guint lengthA, Object *dictA): BaseStream(dictA, lengthA) { buf = bufA; start = startA; length = lengthA; bufEnd = buf + start + length; bufPtr = buf + start; needFree = gFalse; }
Overflow
0
MemStream::MemStream(char *bufA, Guint startA, Guint lengthA, Object *dictA): BaseStream(dictA, lengthA) { buf = bufA; start = startA; length = lengthA; bufEnd = buf + start + length; bufPtr = buf + start; needFree = gFalse; }
@@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar <jeff@infidigm.net> -// Copyright (C) 2006-2010, 2012 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2006-2010, 2012, 2013 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>...
CWE-119
null
null