Commit 26f0780c authored by 李秉薇's avatar 李秉薇

fix:39980

parent e3e16430
...@@ -1238,8 +1238,13 @@ void UDS_Service_27_Indication ( uint32_t A_TA_type, uint16_t A_Length, uint8_t ...@@ -1238,8 +1238,13 @@ void UDS_Service_27_Indication ( uint32_t A_TA_type, uint16_t A_Length, uint8_t
//获取数据 //获取数据
(void) memcpy(UDS_ISO14229_Transfer,A_Data,Service27DiagDataLength); (void) memcpy(UDS_ISO14229_Transfer,A_Data,Service27DiagDataLength);
//27服务最小长度为1
if(Service27DiagDataLength < 1)
{
NegRes.code = incorrectMessageLength;
UDS_Service_Response ( 0x27, NEGATIVE_RSP, DIAG_ID_Tx, 1, ( uint8_t * ) ( &NegRes.code ) );
return;
}
//不支持除27 01和27 02以外的子服务,返回12负反馈 //不支持除27 01和27 02以外的子服务,返回12负反馈
if ( ( UDS_ISO14229_Transfer[0] != 0x01 ) && ( UDS_ISO14229_Transfer[0] != 0x02 ) && ( UDS_ISO14229_Transfer[0] != 0x05 ) && ( UDS_ISO14229_Transfer[0] != 0x06 )) if ( ( UDS_ISO14229_Transfer[0] != 0x01 ) && ( UDS_ISO14229_Transfer[0] != 0x02 ) && ( UDS_ISO14229_Transfer[0] != 0x05 ) && ( UDS_ISO14229_Transfer[0] != 0x06 ))
{ {
...@@ -1247,7 +1252,6 @@ void UDS_Service_27_Indication ( uint32_t A_TA_type, uint16_t A_Length, uint8_t ...@@ -1247,7 +1252,6 @@ void UDS_Service_27_Indication ( uint32_t A_TA_type, uint16_t A_Length, uint8_t
UDS_Service_Response ( 0x27, NEGATIVE_RSP, DIAG_ID_Tx, 1, ( uint8_t * ) ( &NegRes.code ) ); UDS_Service_Response ( 0x27, NEGATIVE_RSP, DIAG_ID_Tx, 1, ( uint8_t * ) ( &NegRes.code ) );
return; return;
} }
//不支持除27 01和27 02以外的子服务,返回12负反馈 //不支持除27 01和27 02以外的子服务,返回12负反馈
if ( (( UDS_ISO14229_Transfer[0] == 0x01 ) || ( UDS_ISO14229_Transfer[0] == 0x02 )) && (SessionType != ExtendedDiagnosticSession)) if ( (( UDS_ISO14229_Transfer[0] == 0x01 ) || ( UDS_ISO14229_Transfer[0] == 0x02 )) && (SessionType != ExtendedDiagnosticSession))
{ {
......
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