[Bug 3269] sshbuf_get_u32() called with enum type argument in monitor.c

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Mar 5 00:32:08 AEDT 2021


https://bugzilla.mindrot.org/show_bug.cgi?id=3269

--- Comment #6 from Stephen Goetze <goetze at dovetail.com> ---
Thanks for the patch.  I'm wondering if it isn't better in this case to
not ever introduce the enum type at all here.  How about just changing
the type of "type" to u_int32_t?

This way, if there is any garbage in the high order bytes in the
sshbuf, that won't be lost in the assignment conversion, and the switch
that follows would detect any bad data.  In the switch, the conversion
go the right direction, from enum to u_int32_t

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.


More information about the openssh-bugs mailing list