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

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Thu Mar 4 10:00:20 AEDT 2021


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

--- Comment #5 from Darren Tucker <dtucker at dtucker.net> ---
Created attachment 3475
  --> https://bugzilla.mindrot.org/attachment.cgi?id=3475&action=edit
explicitly use uint32 for enum in monitor

(In reply to Stephen Goetze from comment #3)
> When I switch to c89, the problem persists, so it appears that IBM
> doesn't downshift their treatment of enumerations when running in
> c89 mode.

That sounds like a compiler bug.

> You may want to make a note of this new behavior in c99 if you ever
> decide to specify a newer standard for building; the potential
> exists for a nasty bug.

I think we should still do something about this.  We're slowly using
C99 features (eg recently, variadic macros) and I don't think it's
strictly correct for C89 either: the same problem could occur on a
platform where int<32bits (although I know of no such platform that
it'll currently run on) or int>32 bits (which is plausible, and I'd
imagine whether or not it would work properly would depend on the
endianness).

Does this patch fix it for you?

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


More information about the openssh-bugs mailing list