Closed cbiffle closed 2 years ago
If dhara_journal_enqueue is called with a NULL data pointer, this logic can fall through to line 840 with my_err still set to DHARA_E_NONE:
dhara_journal_enqueue
NULL
data
my_err
DHARA_E_NONE
if (!(prepare_head(j, &my_err) || (data && dhara_nand_prog(j->nand, j->head, data, &my_err)))) return push_meta(j, meta, err); if (recover_from(j, my_err, err) < 0) return -1;
This causes it to pass DHARA_E_NONE into recover_from, which will treat it as a failure due to this test. The net effect is that dhara_journal_enqueue will return -1, but the *err value will be DHARA_E_NONE.
recover_from
*err
...actually, I think I misunderstood the logic in that nested ||/&& expression, and am incorrect.
||
&&
If
dhara_journal_enqueue
is called with aNULL
data
pointer, this logic can fall through to line 840 withmy_err
still set toDHARA_E_NONE
:This causes it to pass
DHARA_E_NONE
intorecover_from
, which will treat it as a failure due to this test. The net effect is thatdhara_journal_enqueue
will return -1, but the*err
value will beDHARA_E_NONE
.