Fixes for w-format-truncation. Also, export of zones work again on linux

This commit is contained in:
Thomas Arp
2020-01-11 01:05:32 +01:00
parent b028d60749
commit 29f19f9ce5
8 changed files with 60 additions and 34 deletions

View File

@@ -936,7 +936,7 @@ void index_boot(int mode)
const char *index_filename, *prefix = NULL; /* NULL or egcs 1.1 complains */
FILE *db_index, *db_file;
int line_number, rec_count = 0, size[2];
char buf2[PATH_MAX], buf1[MAX_STRING_LENGTH];
char buf2[PATH_MAX], buf1[PATH_MAX - 100]; // - 100 to make room for prefix
switch (mode) {
case DB_BOOT_WLD:
@@ -3900,7 +3900,7 @@ static void load_default_config( void )
void load_config( void )
{
FILE *fl;
char line[MAX_STRING_LENGTH];
char line[READ_SIZE - 2]; // to make sure there's room for readding \r\n
char tag[MAX_INPUT_LENGTH];
int num;
char buf[MAX_INPUT_LENGTH];