nfs: fix SECINFO_NO_NAME parser handling

nfs4_res_secinfo_no_name() used a local var "i2" to walk through
the security-flavor array entries, but returned the pre-walk var "i"
in the Ok at the end. Every byte of the flavor array was therefore left
unconsumed in the input stream and re-interpreted by count next iteration
as a subsequent compound operation.

Addressed by returning i2 instead of i so all flavor bytes are consumed.

Ticket: #8860.
(cherry picked from commit 9b491a131e)
pull/16171/head
Victor Julien 1 month ago
parent 19698065ec
commit 1bcfc219f1

@ -983,7 +983,7 @@ fn nfs4_res_secinfo_no_name(i: &[u8]) -> IResult<&[u8], Nfs4ResponseContent<'_>>
let (i3, _flavor) = nfs4_parse_flavors(i2)?;
i2 = i3;
}
Ok((i, Nfs4ResponseContent::SecInfoNoName(status)))
Ok((i2, Nfs4ResponseContent::SecInfoNoName(status)))
}
#[derive(Debug, PartialEq, Eq)]

Loading…
Cancel
Save