Commit 724e75ee authored by Cody Cutler's avatar Cody Cutler Committed by Mike Hibler

Choose sensible size for pcomp in secure state verification

And a couple of error-printf bugfixes
(cherry picked from commit e31153aee1c7da2bb92d8528f951b34b952d0eda)
parent e280ae1d
......@@ -5195,7 +5195,7 @@ COMMAND_PROTOTYPE(dosecurestate)
{
char newstate[128]; /* More then we will ever need */
char quote[1024];
char pcomp[256];
char pcomp[1024];
unsigned char quote_bin[256];
unsigned char pcomp_bin[128];
ssize_t pcomplen, quotelen;
......@@ -5235,7 +5235,8 @@ COMMAND_PROTOTYPE(dosecurestate)
* simple binary.
*/
if ((strlen(quote) % 2) != 0) {
error("SECURESTATE: %s: Malformed quote: odd length\n");
error("SECURESTATE: %s: Malformed quote: odd length\n",
reqp->nodeid);
return 1;
}
quotelen = strlen(quote)/2;
......@@ -5250,7 +5251,8 @@ COMMAND_PROTOTYPE(dosecurestate)
}
if ((strlen(pcomp) % 2) != 0) {
error("SECURESTATE: %s: Malformed pcomp: odd length\n");
error("SECURESTATE: %s: Malformed pcomp: odd length\n",
reqp->nodeid);
return 1;
}
pcomplen = strlen(pcomp)/2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment