MaskPredicate in detectors.cpp possible undefined behavior (Bug #419)


Added by Markus Moll over 14 years ago. Updated over 14 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:- % Done:

0%

Category:imgproc, video
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

MaskPredicate has a broken assignment operator. Either it is never used, in which case it's potentially dangerous and should be removed, or it is actually used in which case the semantics are broken and it can easily produce undefined behavior. The proper fix in my opinion would be to replace the reference in MaskPredicate by a pointer, in which case everything would automagically work correctly.


detectors.cpp.patch - Patch for detectors.cpp (857 Bytes) Markus Moll, 2010-07-05 01:26 pm


Associated revisions

Revision 354be115
Added by Maria Dimashova over 14 years ago

made MaskPredicate safer (#419)

History

Updated by Maria Dimashova over 14 years ago

Fixed in r4056. Matrix header is copied now, assignment operator was removed.
Thanks.

  • Status changed from Open to Done
  • (deleted custom field) set to fixed

Also available in: Atom PDF