[OpenSIPS-Devel] [ opensips-Patches-2083435 ] gflags patch

SourceForge.net noreply at sourceforge.net
Sat Aug 30 15:34:00 CEST 2008


Patches item #2083435, was opened at 2008-08-30 07:09
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2083435&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
>Group: trunk
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Richard Revels (rrevels)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: gflags patch

Initial Comment:
Small patch to gflags.c to make gflags work as documented.   This will break anyone using gflags currently of course but it should be noted that without this change using set_gflag 32 in script not only won't work as expected but will overflow the gflag buffer.

----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-08-30 16:34

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Richard,

I do not see problem. In fixup_gflags(), myint is originally a bit index
between 0 and 31, and not between 1 and 32 - the only error is in the error
print message and in the docs (flag 0 is also available).

Also the condition in mi_is_gflag(), indeed was broken - it was testing if
at least one flag is set instead of testing if all the flags are set.

Fixes (code and docs) are available on trunk and 1.4 branch.

Thanks and regards,
Bogdan

PS: if something missed me, please re-open the bug.

----------------------------------------------------------------------

Comment By: Richard Revels (rrevels)
Date: 2008-08-30 07:52

Message:
Logged In: YES 
user_id=499549
Originator: YES

Poor choice of words there.  Will overflow the gflag buffer into the
ozone.  No danger of memory corruption or anything.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=2083435&group_id=232389



More information about the Devel mailing list