[Serdev] off-by-one error in config part of gflags module
Hendrik Scholz
hendrik.scholz at freenet-ag.de
Thu Jan 4 13:13:39 UTC 2007
Hi!
I intended to protect a code block using is_gflag() on a post-Ottendorf
SER but ran into an off by one bug:
Inside ser.cfg I check for gflag 1:
if (is_gflag(1)) { ... }
After startup is_gflag() fails as expected. Now I set flag '1':
# sercmd gflags.dump | head -2
0
0
# sercmd gflags.set 1
# sercmd gflags.dump | head -2
0
1
#
At this point the code block is not executed but if I go ahead
and set flag '0' is for sure is:
# sercmd gflags.set 0
# sercmd gflags.dump | head -2
1
1
#
I don't have the time to dig into this but it's not what I expect
it to do ;)
Cheers,
Hendrik
P.S.: tracker.iptel.org doesn't like me right now therefore I'll
file the bug later.
--
freenet Cityline GmbH, Hamburger Chaussee 2-4, 24114 Kiel, Germany
Phone: +49 (0)431 9020552, Fax: +49 (0)431 9020559
Internet: http://www.freenet.de, eMail: hendrik.scholz at freenet-ag.de
More information about the Serdev
mailing list