diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-06-01 16:59:44 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2018-06-01 16:59:44 +0200 |
commit | 0e06e1e74355e86aeda52bf2a2ca8f4dd2cde954 (patch) | |
tree | 6dc7f2066dbd3ca31b3ee08f76a2a40c903d8d66 | |
parent | 80bce7afb0cccdb9dbf82b24aebdcb36f918f2aa (diff) | |
download | ATCD-0e06e1e74355e86aeda52bf2a2ca8f4dd2cde954.tar.gz |
Fix issue #570, crash of TAO_IDL on invalid IDL
* TAO/TAO_IDL/util/utl_scope.cpp:
-rw-r--r-- | TAO/TAO_IDL/util/utl_scope.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/TAO/TAO_IDL/util/utl_scope.cpp b/TAO/TAO_IDL/util/utl_scope.cpp index 6a909093d90..f8b25ec0f32 100644 --- a/TAO/TAO_IDL/util/utl_scope.cpp +++ b/TAO/TAO_IDL/util/utl_scope.cpp @@ -1215,8 +1215,14 @@ UTL_Scope::lookup_by_name (UTL_ScopedName *e, const bool global_scope_name = work->is_global_name (name); if (global_scope_name) { + // No tail, exit directly + UTL_List* tail = e->tail (); + if (!tail) + { + return 0; + } // Remove the preceeding "::" or "" from the scopename - e = static_cast<UTL_ScopedName *> (e->tail ()); + e = static_cast<UTL_ScopedName *> (tail); name = e->head (); // Move directly to the root scope |