mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:03:04 +01:00
Constant is the max size of the string, not the max length.
This commit is contained in:
parent
8e8ea430b4
commit
bc4b0d127f
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
$Id: backup.epp,v 1.67 2004-10-30 05:58:47 robocop Exp $
|
||||
$Id: backup.epp,v 1.68 2004-10-30 07:05:41 robocop Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -1262,7 +1262,7 @@ void put_array( burp_fld* field, burp_rel* relation, ISC_QUAD* blob_id)
|
||||
|
||||
if (return_length)
|
||||
{
|
||||
UCHAR* p;
|
||||
const UCHAR* p;
|
||||
if (tdgbl->gbl_sw_transportable)
|
||||
{
|
||||
lstring xdr_slice;
|
||||
@ -1305,7 +1305,7 @@ void put_asciz( const SCHAR attribute, const TEXT* string)
|
||||
|
||||
const ULONG l = strlen(string);
|
||||
#pragma FB_COMPILER_MESSAGE("CVC: Check that file doesn't exceed 255 in length!")
|
||||
// We'll have to ensure that length < MAX_FILE_NAME_LENGTH
|
||||
// We'll have to ensure that length < MAX_FILE_NAME_SIZE
|
||||
|
||||
put(tdgbl, (UCHAR) (attribute));
|
||||
put(tdgbl, (UCHAR) (l));
|
||||
|
@ -640,7 +640,7 @@ enum gfld_flags_vals {
|
||||
|
||||
// CVC: Could use MAXPATHLEN, but what about restoring in a different system?
|
||||
// I need to review if we tolerate different lengths for different OS's here.
|
||||
const int MAX_FILE_NAME_LENGTH = 256;
|
||||
const int MAX_FILE_NAME_SIZE = 256;
|
||||
|
||||
// Note that this typedef is also defined in JRD.H and REMOTE.H
|
||||
// but for some reason we are avoiding including JRD.H
|
||||
@ -832,8 +832,8 @@ public:
|
||||
UCHAR* mvol_io_volume;
|
||||
UCHAR* mvol_io_header;
|
||||
UCHAR* mvol_io_data;
|
||||
TEXT mvol_db_name_buffer [MAX_FILE_NAME_LENGTH];
|
||||
SCHAR mvol_old_file [MAX_FILE_NAME_LENGTH];
|
||||
TEXT mvol_db_name_buffer [MAX_FILE_NAME_SIZE];
|
||||
SCHAR mvol_old_file [MAX_FILE_NAME_SIZE];
|
||||
int mvol_volume_count;
|
||||
USHORT mvol_empty_file;
|
||||
isc_db_handle db_handle;
|
||||
|
@ -189,8 +189,8 @@ void MVOL_init_read(const char* database_name, // unused?
|
||||
|
||||
if (file_name != NULL)
|
||||
{
|
||||
strncpy(tdgbl->mvol_old_file, file_name, MAX_FILE_NAME_LENGTH);
|
||||
tdgbl->mvol_old_file[MAX_FILE_NAME_LENGTH - 1] = 0;
|
||||
strncpy(tdgbl->mvol_old_file, file_name, MAX_FILE_NAME_SIZE);
|
||||
tdgbl->mvol_old_file[MAX_FILE_NAME_SIZE - 1] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -237,8 +237,8 @@ void MVOL_init_write(const char* database_name, // unused?
|
||||
|
||||
if (file_name != NULL)
|
||||
{
|
||||
strncpy(tdgbl->mvol_old_file, file_name, MAX_FILE_NAME_LENGTH);
|
||||
tdgbl->mvol_old_file[MAX_FILE_NAME_LENGTH - 1] = 0;
|
||||
strncpy(tdgbl->mvol_old_file, file_name, MAX_FILE_NAME_SIZE);
|
||||
tdgbl->mvol_old_file[MAX_FILE_NAME_SIZE - 1] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -866,7 +866,7 @@ static DESC next_volume( DESC handle, ULONG mode, bool full_buffer)
|
||||
|
||||
// Loop until we have opened a file successfully
|
||||
|
||||
SCHAR new_file[MAX_FILE_NAME_LENGTH];
|
||||
SCHAR new_file[MAX_FILE_NAME_SIZE];
|
||||
DESC new_desc = INVALID_HANDLE_VALUE;
|
||||
for (;;)
|
||||
{
|
||||
@ -1097,7 +1097,7 @@ static bool read_header(DESC handle,
|
||||
USHORT* format,
|
||||
bool init_flag)
|
||||
{
|
||||
TEXT buffer[MAX_FILE_NAME_LENGTH], msg[BURP_MSG_GET_SIZE];
|
||||
TEXT buffer[MAX_FILE_NAME_SIZE], msg[BURP_MSG_GET_SIZE];
|
||||
|
||||
BurpGlobals* tdgbl = BurpGlobals::getSpecific();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user