forked from wolfSSL/wolfssl
Merge pull request #890 from dgarske/fix_sb_sni
Fix for scan build warning for `TLSX_SNI_GetRequest` possible use of null ptr
This commit is contained in:
@@ -1699,9 +1699,10 @@ word16 TLSX_SNI_GetRequest(TLSX* extensions, byte type, void** data)
|
||||
if (sni && sni->status != WOLFSSL_SNI_NO_MATCH) {
|
||||
switch (sni->type) {
|
||||
case WOLFSSL_SNI_HOST_NAME:
|
||||
if (data)
|
||||
if (data) {
|
||||
*data = sni->data.host_name;
|
||||
return (word16)XSTRLEN((char*)*data);
|
||||
return (word16)XSTRLEN((char*)*data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user