[Bug 3102] Compilation error in sshbuf-misc.c on IRIX 6.5 with MIPSPro 7.4

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Mon Dec 2 12:26:00 AEDT 2019


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

Darren Tucker <dtucker at dtucker.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dtucker at dtucker.net

--- Comment #1 from Darren Tucker <dtucker at dtucker.net> ---
(In reply to Ole Weidner from comment #0)
> cc-1515 c99: ERROR File = sshbuf-misc.c, Line = 225
>   A value of type "int" cannot be assigned to an entity of type
> "void *".
> 
>         if ((p = memmem(sshbuf_ptr(b) + start_offset,
> 
> This can be easily fixed by changing line 215 from void *p to 
> to size_t p

That's not correct, though.  Although it's not standardized, the
consensus seems to be memmem returns a void *
(http://man7.org/linux/man-pages/man3/memmem.3.html) and that's
certainly what OpenSSH expects (https://man.openbsd.org/memmem).

Does IRIX define its own memmem to return an integer type (ie is
HAVE_MEMMEM in config.h) or is this a result of a missing prototype? 
(It's defined in openbsd-compat.h which is pulled in via includes.h,
but it's possible there might be some reason it doesn't work).

-- 
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