Buffer overrun in haar.cpp (Bug #1389)


Added by msrtis - over 13 years ago. Updated almost 13 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:objdetect
Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

Line 248 of haar.cpp will overflow errorstr:

sprintf( errorstr, "rectangle #%d of the classifier #%d of " 
                   "the stage classifier #%d is not inside " 
                   "the reference (original) cascade window", k, j, i );

The text alone, ignoring the length of the variables, is greater than the size of the buffer:

char errorstrr100;

This bug was found with cppcheck 1.50.


Related issues

duplicated by Bug #1661: cppcheck: haar.cpp, buffer overflow in sprintf Cancelled 2012-03-08

Associated revisions

Revision 3535aacc
Added by Vadim Pisarevsky over 13 years ago

fixed bug #1389

Revision 00991987
Added by Roman Donchenko over 11 years ago

Merge pull request #1389 from SpecLad:merge-2.4

History

Updated by Vadim Pisarevsky over 13 years ago

thanks! fixed in trunk, r6781

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

Updated by Andrey Kamaev almost 13 years ago

  • Target version set to 2.4.0

Also available in: Atom PDF