diff options
| author | yangwei <[email protected]> | 2024-05-06 14:44:11 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-05-06 14:44:11 +0800 |
| commit | b82c1b6c0a24bf1a3f6b8c9136b8f298175f6c7c (patch) | |
| tree | 315c71e2b7cd0902bbc9533f09723da09249f62d /src/SSL_Proc.c | |
| parent | 484cb7a71951b32e353ba649aa77f636699e8e4e (diff) | |
🐞 fix(BtoL): check input bufferv3.0.7Fix-BtoL-segfault
Diffstat (limited to 'src/SSL_Proc.c')
| -rw-r--r-- | src/SSL_Proc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/SSL_Proc.c b/src/SSL_Proc.c index 4389c24..4f8356f 100644 --- a/src/SSL_Proc.c +++ b/src/SSL_Proc.c @@ -166,6 +166,7 @@ struct ssl_serial_string g_astCipherSuit[] = int BtoL4BytesNum(const char *pcData) { + if(pcData==NULL) return 0; int uiLength = 0; uiLength = pcData[0]; uiLength = (uiLength << 8) + (unsigned char)pcData[1]; @@ -176,6 +177,7 @@ int BtoL4BytesNum(const char *pcData) int BtoL3BytesNum(const char *pcData) { + if(pcData==NULL) return 0; int uiLength = 0; uiLength = pcData[0]; uiLength = (uiLength << 8) + (unsigned char)pcData[1]; @@ -186,6 +188,7 @@ int BtoL3BytesNum(const char *pcData) int BtoL2BytesNum(const char *pcData) { + if(pcData==NULL) return 0; int uiLength = 0; uiLength = pcData[0]; uiLength = (uiLength << 8) + (unsigned char)pcData[1]; @@ -195,6 +198,7 @@ int BtoL2BytesNum(const char *pcData) int BtoL1BytesNum(const char *pcData) { + if(pcData==NULL) return 0; int uiLength = 0; uiLength = pcData[0]; |
