Skip to contentSkip to conversation

rtl8188eu array/null comparison.

DISCUSSION Dave Jones 2 participants 2 messages Sep 4, 2013 – Sep 5, 2013

Subsystems (2)
lore
Share & tools
lore

Dave Jones

author
#0 lore raw

Hi Larry,

in drivers/staging/rtl8188eu/core/rtw_mlme.c:rtw_check_join_candidate there's this code..

1721 /* check ssid, if needed */
1722 if (pmlmepriv->assoc_ssid.Ssid && pmlmepriv->assoc_ssid.SsidLength) {
1723 if (competitor->network.Ssid.SsidLength != pmlmepriv->assoc_ssid.SsidLength ||
1724 _rtw_memcmp(competitor->network.Ssid.Ssid, pmlmepriv->assoc_ssid.Ssid, pmlmepriv->assoc_ssid.SsidLength) == false)
1725 goto exit;
1726 }
1727

assoc_ssid.Ssid being an array, this comparison against null probably isn't what was intended ?

Dave

#1 lore raw
Quoted 12 lines · Dave Jones

Hi Larry,

in drivers/staging/rtl8188eu/core/rtw_mlme.c:rtw_check_join_candidate there's this code..

1721 /* check ssid, if needed */
1722 if (pmlmepriv->assoc_ssid.Ssid && pmlmepriv->assoc_ssid.SsidLength) {
1723 if (competitor->network.Ssid.SsidLength != pmlmepriv->assoc_ssid.SsidLength ||
1724 _rtw_memcmp(competitor->network.Ssid.Ssid, pmlmepriv->assoc_ssid.Ssid, pmlmepriv->assoc_ssid.SsidLength) == false)
1725 goto exit;
1726 }
1727

Quoted 1 line

assoc_ssid.Ssid being an array, this comparison against null probably isn't what was intended ?

I think that a non-zero SsidLength should be enough of a test, but I need to think about a bit more.

Thanks,

Larry