GNOME Bugzilla – Bug 110146
ORBit2 crashes on null string in trace code
Last modified: 2004-12-22 21:47: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.
Created attachment 15522 [details] [review] More thorough check for null string in ORBit_trace_value
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.