| author | Christophe Augier | 2012-11-28 08:56:38 (EST) |
|---|---|---|
| committer | Eugene Tarassov | 2012-11-28 17:22:53 (EST) |
| commit | bc3bb55d6999cca201fae46bf35223202b6e9f7e (patch) (side-by-side diff) | |
| tree | 2172448e160fa5d9b7653996df31f0a1673aa074 | |
| parent | 6f565328acfecd03841a0641ac3ffad0c353b68a (diff) | |
| download | org.eclipse.tcf.agent-bc3bb55d6999cca201fae46bf35223202b6e9f7e.zip org.eclipse.tcf.agent-bc3bb55d6999cca201fae46bf35223202b6e9f7e.tar.gz org.eclipse.tcf.agent-bc3bb55d6999cca201fae46bf35223202b6e9f7e.tar.bz2 | |
Bug 395190 - Quote context name if it includes '/'
'/' is used as the delimitor for fully qualifying a context based
on its and its ancestors names. If the context name includes '/'
the context full name may be prone to different interpretations.
| -rw-r--r-- | agent/tcf/framework/context.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/agent/tcf/framework/context.c b/agent/tcf/framework/context.c index 5c0f630..fd785a6 100644 --- a/agent/tcf/framework/context.c +++ b/agent/tcf/framework/context.c @@ -160,7 +160,10 @@ static void get_context_full_name(Context * ctx) { get_context_full_name(ctx->parent); buf_char('/'); if (name != NULL) { + int quote = strchr(name, '/') == NULL ? 0 : 1; + if (quote) buf_char('"'); while (*name) buf_char(*name++); + if (quote) buf_char('"'); } } } |

