From 0bdbede95f6dcdcba175b8a34cc8ee37f134ee93 Mon Sep 17 00:00:00 2001 From: Alain Spineux Date: Fri, 19 Feb 2021 10:58:22 +0100 Subject: [PATCH] Check if char **jobid parameter is NULL before to modify it in bvfs_parse_arg_version() - it looks like the function can handle a NULL parameter, som lines above and below does the check, it looks right to do it everywhere before to modify jobid --- bacula/src/dird/ua_dotcmds.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bacula/src/dird/ua_dotcmds.c b/bacula/src/dird/ua_dotcmds.c index bba5ba5be..a8f819383 100644 --- a/bacula/src/dird/ua_dotcmds.c +++ b/bacula/src/dird/ua_dotcmds.c @@ -635,7 +635,9 @@ static bool bvfs_parse_arg(UAContext *ua, /* Store the jobid after the ua->cmd, a bit kluggy */ int len = strlen(ua->cmd); ua->cmd = check_pool_memory_size(ua->cmd, len + 1 + 50); - *jobid = edit_uint64(jr.JobId, ua->cmd + len + 1); + if (jobid) { + *jobid = edit_uint64(jr.JobId, ua->cmd + len + 1); + } } if (strcasecmp(ua->argk[i], NT_("limit")) == 0) { -- 2.47.3