8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 22:43:04 +01:00

Fixed bug CORE-2781 : AV in fbtracemgr when command line swithes set wrongly

This commit is contained in:
hvlad 2009-12-01 14:45:20 +00:00
parent 7d22c2674d
commit eca2c62138

View File

@ -225,7 +225,7 @@ void fbtrace(UtilSvc* uSvc, TraceSvcIntf* traceSvc)
usage(uSvc, isc_trace_switch_once, sw->in_sw_name);
argv++;
if (argv < end)
if (argv < end && *argv)
session.ses_config = *argv;
else
usage(uSvc, isc_trace_param_val_miss, sw->in_sw_name);
@ -246,7 +246,7 @@ void fbtrace(UtilSvc* uSvc, TraceSvcIntf* traceSvc)
usage(uSvc, isc_trace_switch_once, sw->in_sw_name);
argv++;
if (argv < end)
if (argv < end && *argv)
session.ses_name = *argv;
else
usage(uSvc, isc_trace_param_val_miss, sw->in_sw_name);
@ -265,7 +265,7 @@ void fbtrace(UtilSvc* uSvc, TraceSvcIntf* traceSvc)
usage(uSvc, isc_trace_switch_once, sw->in_sw_name);
argv++;
if (argv < end)
if (argv < end && *argv)
{
session.ses_id = atol(*argv);
if (!session.ses_id)
@ -304,7 +304,7 @@ void fbtrace(UtilSvc* uSvc, TraceSvcIntf* traceSvc)
usage(uSvc, isc_trace_switch_once, sw->in_sw_name);
argv++;
if (argv < end)
if (argv < end && *argv)
user = *argv;
else
usage(uSvc, isc_trace_param_val_miss, sw->in_sw_name);
@ -315,7 +315,7 @@ void fbtrace(UtilSvc* uSvc, TraceSvcIntf* traceSvc)
usage(uSvc, isc_trace_switch_once, sw->in_sw_name);
argv++;
if (argv < end)
if (argv < end && *argv)
pwd = *argv;
else
usage(uSvc, isc_trace_param_val_miss, sw->in_sw_name);
@ -329,7 +329,7 @@ void fbtrace(UtilSvc* uSvc, TraceSvcIntf* traceSvc)
usage(uSvc, isc_trace_switch_once, sw->in_sw_name);
argv++;
if (argv < end)
if (argv < end && *argv)
{
const PathName fileName(*argv);
const char *s = NULL;
@ -370,7 +370,7 @@ void fbtrace(UtilSvc* uSvc, TraceSvcIntf* traceSvc)
usage(uSvc, isc_trace_switch_once, sw->in_sw_name);
argv++;
if (argv < end)
if (argv < end && *argv)
user = *argv;
else
usage(uSvc, isc_trace_param_val_miss, sw->in_sw_name);
@ -391,7 +391,7 @@ void fbtrace(UtilSvc* uSvc, TraceSvcIntf* traceSvc)
usage(uSvc, isc_trace_switch_once, sw->in_sw_name);
argv++;
if (argv < end)
if (argv < end && *argv)
svc_name = *argv;
else
usage(uSvc, isc_trace_param_val_miss, sw->in_sw_name);