aqjune added a comment.
It seems the original code has a use of an uninitialized variable.
Line 4420 at seek-preproc.c (function `ff_seek_frame_binary`):
int64_t pos_min=pos_min, pos_max=pos_max, pos, pos_limit; // pos_min and
pos_max are self-assigned.
...
if (sti->index_entries) {
...
}
// pos_min and pos_max are used as arguments below
pos = ff_gen_search(s, stream_index, target_ts, pos_min, pos_max, pos_limit,
ts_min, ts_max, flags, &ts, avif->read_timestamp);
https://gist.github.com/aqjune/3bd0ea19bbc12b4744843c0c070e994c
If the branch is not taken, `pos_min` and `pos_max` are read while they are
still uninitialized.
I guess the variables are self-assigned to avoid warnings?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105169/new/
https://reviews.llvm.org/D105169
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits