Hi Richard,
I mean the change of that two lines to like:
        if (cnt < m->header.messageLength || m->header.messageLength <
pdulen) {
                pr_debug("wrong length, cnt: %d messageLength: %hu pdulen
:%d",
                                cnt, m->header.messageLength, pdulen);
                return -EBADMSG;
        }

Thanks,
vincent

-----Original Message-----
From: Richard Cochran <[email protected]> 
Sent: Friday, February 1, 2019 4:45 AM
To: Vincent Li X <[email protected]>
Cc: Jiri Benc <[email protected]>; Miroslav Lichvar <[email protected]>;
Mats Bergman H <[email protected]>; Richard Jönsson
<[email protected]>; [email protected]
Subject: Re: [Linuxptp-devel] ptp4l wrongly takes padding bytes as TLV?

On Thu, Jan 31, 2019 at 04:28:30PM +0000, Vincent Li X wrote:
> we might also need to check again m->header.messageLength is bigger 
> than cnt.

What?  We already have

        if (cnt < pdulen)
                return -EBADMSG;

in msg_post_recv();

Or did you mean something else?

Thanks,
Richard

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to