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 <richardcoch...@gmail.com> 
Sent: Friday, February 1, 2019 4:45 AM
To: Vincent Li X <vincent.x...@ericsson.com>
Cc: Jiri Benc <jb...@redhat.com>; Miroslav Lichvar <mlich...@redhat.com>;
Mats Bergman H <mats.h.berg...@ericsson.com>; Richard Jönsson
<richard.jons...@ericsson.com>; Linuxptp-devel@lists.sourceforge.net
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
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to