mirror of https://github.com/rusefi/openblt.git
Refs #606. Corrected key length assertion and validation in XcpLoaderSendCmdUnlock().
git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@561 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
parent
56cf1c696d
commit
14e2f87abd
|
@ -929,12 +929,12 @@ static bool XcpLoaderSendCmdUnlock(uint8_t const * key, uint8_t keyLen,
|
|||
assert(xcpSettings.transport != NULL);
|
||||
assert(key != NULL);
|
||||
assert(keyLen > 0);
|
||||
assert(keyLen < (xcpMaxCto - 2));
|
||||
assert(keyLen <= (xcpMaxCto - 2));
|
||||
assert(protectedResources != NULL);
|
||||
|
||||
/* Only continue with a valid transport layer and parameters. */
|
||||
if ( (xcpSettings.transport != NULL) && (key != NULL) && (keyLen > 0) &&
|
||||
(keyLen < (xcpMaxCto - 2)) && (protectedResources != NULL) ) /*lint !e774 */
|
||||
(keyLen <= (xcpMaxCto - 2)) && (protectedResources != NULL) ) /*lint !e774 */
|
||||
{
|
||||
/* Init the result value to okay and only set it to error when a problem occurred. */
|
||||
result = true;
|
||||
|
|
Loading…
Reference in New Issue