From 280aa0b399b3484fc72637570d45658616f09385 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 8 Oct 2025 16:11:15 -0500 Subject: [PATCH] Initialize error strings before any database errors occur --- .../database/src/ioc/dbStatic/dbLexRoutines.c | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/modules/database/src/ioc/dbStatic/dbLexRoutines.c b/modules/database/src/ioc/dbStatic/dbLexRoutines.c index 6b62a7ee1..7ea975986 100644 --- a/modules/database/src/ioc/dbStatic/dbLexRoutines.c +++ b/modules/database/src/ioc/dbStatic/dbLexRoutines.c @@ -238,6 +238,8 @@ static long dbReadCOM(DBBASE **ppdbbase,const char *filename, FILE *fp, goto cleanup; } + errlogInit(0); /* Initialize the errSymTable */ + if(*ppdbbase == 0) *ppdbbase = dbAllocBase(); savedPdbbase = *ppdbbase; if(path && strlen(path)>0) { @@ -352,14 +354,18 @@ cleanup: return(status); } -long dbReadDatabase(DBBASE **ppdbbase,const char *filename, - const char *path,const char *substitutions) -{return (dbReadCOM(ppdbbase,filename,0,path,substitutions));} +long dbReadDatabase(DBBASE **ppdbbase, const char *filename, + const char *path, const char *substitutions) +{ + return dbReadCOM(ppdbbase, filename, 0, path, substitutions); +} + +long dbReadDatabaseFP(DBBASE **ppdbbase, FILE *fp, + const char *path, const char *substitutions) +{ + return dbReadCOM(ppdbbase, 0, fp, path, substitutions); +} -long dbReadDatabaseFP(DBBASE **ppdbbase,FILE *fp, - const char *path,const char *substitutions) -{return (dbReadCOM(ppdbbase,0,fp,path,substitutions));} - static int db_yyinput(char *buf, int max_size) { size_t l,n;