After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 110146 - ORBit2 crashes on null string in trace code
ORBit2 crashes on null string in trace code
Status: RESOLVED FIXED
Product: ORBit2
Classification: Deprecated
Component: general
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: ORBit maintainers
ORBit maintainers
Depends on:
Blocks:
 
 
Reported: 2003-04-07 00:04 UTC by Bowie Owens
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.1/2.2


Attachments
More thorough check for null string in ORBit_trace_value (552 bytes, patch)
2003-04-07 00:04 UTC, Bowie Owens
none Details | Review

Description Bowie Owens 2003-04-07 00:04:04 UTC
ORBit_trace_value may dereference a null pointer when processing
CORBA_tk_string. The condition if (val == NULL) is not sufficient since the
following assignment v = (*(const char **)*val) and string copy does
several levels of dereferencing.

I will shortly add (an almost trivial) patch. Please let me know if I
should commit it and to which branches.
Comment 1 Bowie Owens 2003-04-07 00:04:51 UTC
Created attachment 15522 [details] [review]
More thorough check for null string in ORBit_trace_value
Comment 2 Michael Meeks 2003-04-07 17:36:02 UTC
so; the existing code is broken;

can you hoist up the:

			const char * v = (*(const char **)*val);

to above the if; and do if (!v) ... val and *val can never be NULL in
any real case, so it's not worth checking for that IMHO.

With that can you commit to HEAD; - NB. a NULL string is anathama to
CORBA anyway; we should never be sending one of them ;-)

Thanks for the fix.