Permalink
Browse files

We've gone back and forth, but I think clientlenout should account fo…

…r last NULL
  • Loading branch information...
1 parent 8108a5d commit 35a8bf2f307dc6ef578fa4496382ed92185bf494 @ozten committed Nov 17, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 plugins/browserid.c
View
5 plugins/browserid.c
@@ -164,6 +164,7 @@ static int browserid_server_mech_step(void *conn_context,
syslog(LOG_DEBUG, "lup = %d clientinlen = %d", lup,
clientinlen);
+ ++lup;
if (lup != clientinlen) {
SETERROR(sparams->utils,
"Client sent more data than the two fields we were expecting");
@@ -445,7 +446,7 @@ static int browserid_client_mech_step1(void *conn_context,
browser_assertion, browser_audience);
/* send assertion NUL audience NUL */
- *clientoutlen = (strlen(browser_assertion) + 1 + strlen(browser_audience));
+ *clientoutlen = (strlen(browser_assertion) + 1 + strlen(browser_audience) + 1);
syslog(LOG_DEBUG, "clientoutlen is going to be %u", *clientoutlen);
@@ -518,8 +519,6 @@ static int browserid_client_mech_step2(void *conn_context,
oparams->param_version = 0;
cleanup:
-
- /*return result;*/
return result;
}
/**

0 comments on commit 35a8bf2

Please sign in to comment.