Results 1 to 3 of 3

Thread: A range check bug in QwtScaleDiv::setTicks() and QwtScaleDiv::ticks()

  1. #1
    Join Date
    Sep 2010
    Posts
    46
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default A range check bug in QwtScaleDiv::setTicks() and QwtScaleDiv::ticks()

    Hello,

    I noticed there are bugs in these functions (qwt_scale_div.cpp) in Qwt SVN:

    QwtScaleDiv::setTicks():
    if ( type >= 0 || type < NTickTypes )
    should be
    if ( type >= 0 && type < NTickTypes )

    QwtScaleDiv::ticks():
    same here.

    Cheers and thanks for the awesome library!
    Alexander

  2. #2
    Join Date
    Sep 2011
    Posts
    86
    Thanks
    4
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: A range check bug in QwtScaleDiv::setTicks() and QwtScaleDiv::ticks()

    What does it change on charts?

  3. #3
    Join Date
    Sep 2010
    Posts
    46
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: A range check bug in QwtScaleDiv::setTicks() and QwtScaleDiv::ticks()

    I don't think it changes anything.
    It just introduces a possible out-of-bounds error, if the API user is not careful enough.

Similar Threads

  1. Building Debug QwtScaleDiv LNK 2005 error
    By Taxi in forum Installation and Deployment
    Replies: 1
    Last Post: 31st January 2012, 11:19
  2. An error in QwtScaleDiv::invert
    By alex_sh in forum Qwt
    Replies: 3
    Last Post: 12th January 2012, 14:25
  3. Replies: 1
    Last Post: 20th April 2011, 17:23
  4. PyQT QwtScaleDiv adds ticks to axis
    By mbernasocchi in forum Qwt
    Replies: 12
    Last Post: 13th April 2011, 12:29
  5. Problem with scale ticks
    By gd in forum Qwt
    Replies: 4
    Last Post: 10th December 2009, 09:04

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.