turncate hashSigAlgoSz to max buffer size

This commit is contained in:
toddouska 2014-12-01 15:53:59 -08:00
parent 09aeda2162
commit 52c2c126c1

View File

@ -12980,6 +12980,9 @@ int DoSessionTicket(CYASSL* ssl,
XMEMCPY(clSuites.hashSigAlgo, &input[i],
min(clSuites.hashSigAlgoSz, HELLO_EXT_SIGALGO_MAX));
i += clSuites.hashSigAlgoSz;
if (clSuites.hashSigAlgoSz > HELLO_EXT_SIGALGO_MAX)
clSuites.hashSigAlgoSz = HELLO_EXT_SIGALGO_MAX;
}
else
i += extSz;