Skip to content
Snippets Groups Projects
Commit aa4b5b74 authored by Brian Christiansen's avatar Brian Christiansen
Browse files

Fix invalid read by always finding trigger's job.

The job could have been purged from a short MinJobAge and the
trigger would then point to an invalid job.
Bug #1144
parent a52c8147
No related branches found
No related tags found
No related merge requests found
...@@ -1025,10 +1025,7 @@ static bool _front_end_job_test(bitstr_t *front_end_bitmap, ...@@ -1025,10 +1025,7 @@ static bool _front_end_job_test(bitstr_t *front_end_bitmap,
/* Test if the event has been triggered, change trigger state as needed */ /* Test if the event has been triggered, change trigger state as needed */
static void _trigger_job_event(trig_mgr_info_t *trig_in, time_t now) static void _trigger_job_event(trig_mgr_info_t *trig_in, time_t now)
{ {
if ((trig_in->job_ptr == NULL) || trig_in->job_ptr = find_job_record(trig_in->job_id);
(trig_in->job_ptr->magic != JOB_MAGIC) ||
(trig_in->job_ptr->job_id != trig_in->job_id))
trig_in->job_ptr = find_job_record(trig_in->job_id);
if ((trig_in->trig_type & TRIGGER_TYPE_FINI) && if ((trig_in->trig_type & TRIGGER_TYPE_FINI) &&
((trig_in->job_ptr == NULL) || ((trig_in->job_ptr == NULL) ||
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment