mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
null-pointer-20040809
protect against a null pointer reference in smb_ReceiveV3Trans when its the first packet and the totalData and totalParms are 0
This commit is contained in:
parent
4394e421bb
commit
3fd571cb10
@ -1305,7 +1305,9 @@ long smb_ReceiveV3Trans(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
|||||||
asp->curParms += parmCount;
|
asp->curParms += parmCount;
|
||||||
|
|
||||||
/* finally, if we're done, remove the packet from the queue and dispatch it */
|
/* finally, if we're done, remove the packet from the queue and dispatch it */
|
||||||
if (asp->totalData <= asp->curData && asp->totalParms <= asp->curParms) {
|
if (asp->curData > 0 && asp->curParms > 0 &&
|
||||||
|
asp->totalData <= asp->curData &&
|
||||||
|
asp->totalParms <= asp->curParms) {
|
||||||
/* we've received it all */
|
/* we've received it all */
|
||||||
lock_ObtainWrite(&smb_globalLock);
|
lock_ObtainWrite(&smb_globalLock);
|
||||||
osi_QRemove((osi_queue_t **) &smb_tran2AssemblyQueuep, &asp->q);
|
osi_QRemove((osi_queue_t **) &smb_tran2AssemblyQueuep, &asp->q);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user