ZBar is an open source software suite for reading bar codes from various sources, including webcams. As its development stopped in 2012, I took the task of keeping it updated with the V4L2 API. This is the main repository for it. There's a clone at at LinuxTV.org, and another one at gitlab.
For full background of this PR, see #258
Shortly:
The 0:th bucket in the
iscn->recycle
array holds a list of recycledzbar_symbol_t
with thedata_alloc
set to 0.When a 0-sized symbol is requested, the first loop will exit with
i=0
which makes sense (since these are in the 0:th index in therecycle
array):But then the next for-loop will never enter, as
i > 0
is false:This means that
sym
will still be zero, and a new symbol will be allocated: