[Ekiga-devel-list] Bug & design issue in the video options
- From: Julien Puydt <jpuydt free fr>
- To: Ekiga development mailing list <ekiga-devel-list gnome org>
- Subject: [Ekiga-devel-list] Bug & design issue in the video options
- Date: Fri, 04 Apr 2008 21:58:33 +0200
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.
I'd rather see someone who knows that part of the code better than me
fix that one problem.
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.
Snark
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]