All the below calls to resize() use subtraction in the size calculation and might underflow because of the size being an unsigned int.

To each, add a check to make sure that subtraction doesn't result in a negative value.

abouttab.cc:      text_edit.resize(width() - 2*margin, height() - 2*margin);
abouttab.cc:      text_edit.resize(width - 2*margin, height - 2*margin);
combobox.cc:      listbox.resize(width() - 10, 100);
filebrowser.cc:   lineedit.resize(width - 60 - brd, btn_h);
filebrowser.cc:   listbox.resize(width - 1 - 2*brd, height - btn_h - 2*brd - offset);
filebrowser.cc:   btn_esc.resize((width - 1 - 2*brd) / 2 - brd / 2, btn_h);
filebrowser.cc:   btn_sel.resize((width - 1 - 2*brd) / 2, btn_h);
listbox.cc:       basic.resize(width - (7 + 7),
listboxthin.cc:   basic.resize(width - (1 + 1),
mainwindow.cc:    tabs.resize(width - 2 * 16, height);
tabwidget.cc:     stack.resize(width, height - bar_height);
textedit.cc:      scroll.resize(scroll.width(), height - 2*(y_border - 1));
dev/underflow.txt ยท Last modified: 2017/05/17 19:03 by deva
Trace: underflow
GNU Free Documentation License 1.3
Valid CSS Driven by DokuWiki Recent changes RSS feed Valid XHTML 1.0