-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Line 96 in imgproc.cpp there is a loop:
for (first = 0; first < src_hist->range; first++)
which will run forever for some images while not for others. Why it fails only with certain images is unknown.
It fails with the attached image as an example.
My best guess is that this is caused by the fact that the variable first is an unsigned char, and src_hist->range is set to 256, so when updating the variable in the for loop the unsigned char loops back to 0, causing an infinite loop.
A possible fix would be to set the looping condition to first < src_hist->range-1 instead.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
