memcpy(_tt_log_file, (char *)db_path, prefix_len);
- strcpy(_tt_log_file+prefix_len, _TT_LOG_FILE);
+ snprintf(_tt_log_file + prefix_len, MAXPATHLEN - prefix_len, "%s", _TT_LOG_FILE);
if (access(_tt_log_file, F_OK) == 0) {
_tt_process_transaction();
}
return _tt_transaction_error(fd);
}
memcpy(_tt_log_file, db_path, prefix_len);
- strcpy(_tt_log_file+prefix_len, _TT_LOG_FILE);
+ snprintf(_tt_log_file + prefix_len, MAXPATHLEN - prefix_len, "%s", _TT_LOG_FILE);
if (access(_tt_log_file, F_OK) == 0) {
_tt_process_transaction();
}
// zero out _tt_record, which is where tp points
memset(_tt_record, 0, sizeof(_tt_record));
memcpy(tp->objkey, argp->oidkey.oidkey_val, argp->oidkey.oidkey_len);
- strcpy(tp->propname, filejoin_prop);
+ snprintf(tp->propname, sizeof(tp->propname), "%s", (char *) filejoin_prop);
memcpy(tp->propval, (char *) sessionid, sessionid.len());
isreclen = OID_KEY_LENGTH+MAX_PROP_LENGTH+sessionid.len();
res.result = iswrite(isfd, _tt_record);
currentRecordLength = -1;
currentRecordNumber = -1;
}
+
+ maxRecordLength = 0;
+ minRecordLength = 0;
}
void _Tt_isam_file::setTtISAMFileDefaults ()
_has_outfile = 0;
_has_session = 2; // 1 -> -S option, 2 -> set by default
_has_command = 0;
+ _form = NO_FORM;
}
int
_Tt_api_handle_table()
{
content = new _Tt_api_handle_list;
+ last_phandle = NULL;
}
/*
_Tt_api_callback::
_Tt_api_callback()
{
+ callback = NULL;
}
_Tt_api_callback::
_Tt_api_userdata::
_Tt_api_userdata()
{
+ key = 0;
+ userdata = NULL;
}
_Tt_api_userdata::
class _Tt_client_isam_record : public _Tt_object {
public:
// Dummy constructor needed to make tt_client_isam_record_utils.cc happy
- _Tt_client_isam_record () {}
+ _Tt_client_isam_record ()
+ {
+ currentLength = 0;
+ maxLength = 0;
+ minLength = 0;
+ }
// Real constructor
_Tt_client_isam_record (const _Tt_client_isam_key_descriptor_list_ptr &key_descriptor_list,
setTtDBDefaults();
connectToDB(db_hostname);
status = dbConnectionResults;
+
+ iserrno = 0;
+ isrecnum = 0;
+ isreclen = 0;
+#if !defined(OPT_TLI)
+ dbSocket.sin_family = 0;
+ dbSocket.sin_port = 0;
+#endif
}
_Tt_db_client::_Tt_db_client (const _Tt_string &hostname, _Tt_db_results & status)
_Tt_db_file::
_Tt_db_file()
{
+ dbResults = TT_DB_ERR_ILLEGAL_FILE;
+ checkedDatabase = FALSE;
+ directoryFlag = FALSE;
+ dbFileObjectsCacheLevel = -1;
+ dbFilePropertiesCacheLevel = -1;
+ dbResults = TT_DB_OK;
}
_Tt_db_file::_Tt_db_file (const _Tt_string &file)
{
_auth_level = auth_level;
_auth_cookie = "";
+ _rpc_program = 0;
+ _rpc_version = 0;
+ _entries_head = NULL;
+ _entries_tail = NULL;
}
{
priv = (_Tt_desktop_private *)malloc(sizeof(_Tt_desktop_private));
priv->xd = (Display *)0;
+ user_io_handler = NULL;
}
_version = 0;
_flags = 0;
_mxdr_stream = (XDR *)0;
+ _program = 0;
}
_Tt_int_rec::
_Tt_int_rec()
{
+ val = 0;
}
num_buckets = n;
buckets = (_Tt_object_list_ptr *)calloc(n,
sizeof(_Tt_object_list_ptr));
- _count = 0;
+ _count = 0;
+ _getkey = NULL;
}
_Tt_object_table::
: trace_stream()
{
tracer_init();
+
+ mode = 0; // Technically this is openmode O_RDONLY but will be overwritten
}
_Tt_trace_parser::_Tt_trace_parser(_Tt_trace_parser& templ)
trace_stream[trace_stream.len()] = '\0';
tracer_init();
+
+ mode = 0; // Technically this is openmode O_RDONLY but will be overwritten
}
_Tt_trace_parser::_Tt_trace_parser(const char* script)
{
trace_stream = script;
tracer_init();
+
+ mode = 0; // Technically this is openmode O_RDONLY but will be overwritten
}
void
_Tt_trace_stream::_Tt_trace_stream()
{
+ _is_entered = 0;
}
_Tt_trace_stream::_Tt_trace_stream(
*
* Copyright (c) 1990 by Sun Microsystems, Inc.
*/
+#include <stdint.h>
#if defined(ultrix)
#include <rpc/types.h>
#define bool_t int
/* It is better to promote len to caddr_t than demote x_base to
int for 64 bit arch.
*/
- if (len > 0 && (caddr_t) len < xp->x_base) {
+ if (len > 0 && (caddr_t) (intptr_t) len < xp->x_base) {
xp->x_handy += RNDUP (len);
#if defined(ultrix) || defined(__osf__)
return (int *) xp->x_private;
/*
* Check that the odl and new filename are in the same directory.
*/
- (void)strcpy(olddir, oldname);
+ snprintf(olddir, sizeof(olddir), "%s", oldname);
_removelast2(olddir);
- (void)strcpy(newdir, newname);
+ snprintf(newdir, sizeof(newdir), "%s", newname);
_removelast2(newdir);
if (strcmp(newdir, olddir) != 0) {
_reliability = reliability;
_opnum = opnum;
_scope = s;
+
+ _state = TT_STATE_LAST; // BUG This class member is not set anywhere, but a getter function exists
}
_socket = Rsocket;
_program = program;
_auth = auth;
+ _rpc_fd = 0;
+ _transp = NULL;
}
_mangled_args = 0;
ce_entry = 0;
_timestamp = 0;
+ ce_entry = NULL;
}
_Tt_signature::