Le vendredi 04 avril 2008 à 21:58 +0200, Julien Puydt a écrit : > Hi, > > I had a crash through the following code in opal-gmconf-bridge.cpp: > GMManager::VideoOptions options; > manager.get_video_options (options); > options.maximum_received_bitrate = gm_conf_entry_get_int (entry); > manager.set_video_options (options); > > The reason for the crash is that if you set the maximum_received_bitrate > to zero, it leads to "SIGFPE, Arithmetic exception.". And that is > exactly what this code does : it directly takes a gm_conf_get_int and > shoves where it hurts. > > If the key isn't set in gmconf, then gm_conf_get_int will spit a > warning... and return zero! > > So the obvious fix would be to check for zero before using this integer. > > But there is a better fix : > (1) either it shouldn't be possible to have direct write access to that > option.maximum_received_bitrate -- it should be private and only > accessible through a setter function, which would check what is given ; > (2) or the set_video_options should check option for sanity before > making them the used setting. >
Matthias was taking care of this (iirc). > I've been pretty busy today playing with the --disable-gconf version, > which makes it much easier to do torture tests to ekiga's code since it > makes it so damn trivial to hide the system settings and hence see how > the code copes with a fully broken configuration... until now I found : > a subtle issue (I still have to push the fix to the gnome-2-22 branch), > and some little crashers like the above. Not bad, but definitely not > perfect. Good! -- _ Damien Sandras (o- //\ Ekiga Softphone : http://www.ekiga.org/ v_/_ NOVACOM : http://www.novacom.be/ FOSDEM : http://www.fosdem.org/ SIP Phone : sip:[EMAIL PROTECTED] _______________________________________________ Ekiga-devel-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/ekiga-devel-list
