ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 12101] Error dialog displayed when using context menu colo

Date: Tue, 09 Feb 2016 21:19:49 +0000

Comment # 5 on bug 12101 from
Reproducible with a recent trunk build.

The offending simple_dialog() call is:

    if (ok) {  
        // Assume "Color X"
        gchar *err_msg = NULL;
        if (color_filters_set_tmp(color_number, filter.toUtf8().constData(),
FALSE, &err_msg)) {
            simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_msg);
            g_free(err_msg);
        }
        packet_list_->recolorPackets();

so it appears that color_filters_set_tmp() is returning a non-zero value but
not setting "err_msg".

As color_filters_set_tmp() returns a gboolean, a non-zero value means "true"
and a zero value means "false"; returning TRUE on an error would be a rather
surprising behavior and, in fact, it returns *FALSE* on an error, so that code
is wrong.  Fixed.


You are receiving this mail because:
  • You are watching all bug changes.