[Spice-devel] [PATCH spice-server 07/16] red-stream: Avoid to specify 2 mech names during SASL
Frediano Ziglio
fziglio at redhat.com
Thu Dec 14 10:07:39 UTC 2017
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/red-stream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/red-stream.c b/server/red-stream.c
index 321612bac..ab4ae02cf 100644
--- a/server/red-stream.c
+++ b/server/red-stream.c
@@ -985,7 +985,7 @@ bool red_sasl_handle_auth_mechname(RedStream *stream, AsyncReadDone read_cb, voi
char quoted_mechname[SASL_MAX_MECHNAME_LEN + 4];
sprintf(quoted_mechname, ",%s,", sasl->mechname);
- if (!strstr(sasl->mechlist, quoted_mechname)) {
+ if (strchr(sasl->mechname, ',') || !strstr(sasl->mechlist, quoted_mechname)) {
return false;
}
--
2.14.3
More information about the Spice-devel
mailing list