bugzilla-daemon at mindrot.org
2020-Apr-22  19:12 UTC
[Bug 3152] New: #ifdef around memmem() is invalid.
https://bugzilla.mindrot.org/show_bug.cgi?id=3152
            Bug ID: 3152
           Summary: #ifdef around memmem() is invalid.
           Product: Portable OpenSSH
           Version: 8.2p1
          Hardware: Other
                OS: Windows 10
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Miscellaneous
          Assignee: unassigned-bugs at mindrot.org
          Reporter: balu.gajjala at gmail.com
Different #ifdef used for memmem() declaration and definition.
https://github.com/openssh/openssh-portable/blob/d6cc76176216fe3fac16cd20d148d75cb9c50876/openbsd-compat/openbsd-compat.h#L76
#if defined(HAVE_DECL_MEMMEM) && HAVE_DECL_MEMMEM == 0
void *memmem(const void *, size_t, const void *, size_t);
#endif
https://github.com/openssh/openssh-portable/blob/d6cc76176216fe3fac16cd20d148d75cb9c50876/openbsd-compat/memmem.c#L32
still uses #ifndef HAVE_MEMMEM.
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2020-Apr-22  19:13 UTC
[Bug 3152] #ifdef around memmem() is invalid.
https://bugzilla.mindrot.org/show_bug.cgi?id=3152
balu <balu.gajjala at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bagajjal at microsoft.com
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2020-Apr-22  23:51 UTC
[Bug 3152] #ifdef around memmem() is invalid.
https://bugzilla.mindrot.org/show_bug.cgi?id=3152
Darren Tucker <dtucker at dtucker.net> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dtucker at dtucker.net
         Resolution|---                         |WORKSFORME
--- Comment #1 from Darren Tucker <dtucker at dtucker.net> ---
Nope that's deliberate.  HAVE_MEMMEM means you have the function,
HAVE_DECL_MEMMEM means you have the function declaration.
Over in bug#3102 we found a system that had the function but not the
declaration. At least I think that's what was going on.  I don't have
access to the affected system but the HAVE_DECL_MEMMEM change did
apparently fix it.
-- 
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.
bugzilla-daemon at mindrot.org
2020-Apr-23  18:49 UTC
[Bug 3152] #ifdef around memmem() is invalid.
https://bugzilla.mindrot.org/show_bug.cgi?id=3152 --- Comment #2 from balu <balu.gajjala at gmail.com> --- Interesting. If there is a system that doesn't have a declaration but has a definition then the issue is specific to that environment? Is it expected behavior? I guess No? -- 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.
bugzilla-daemon at mindrot.org
2020-Apr-24  01:04 UTC
[Bug 3152] #ifdef around memmem() is invalid.
https://bugzilla.mindrot.org/show_bug.cgi?id=3152 --- Comment #3 from Darren Tucker <dtucker at dtucker.net> --- (In reply to balu from comment #2)> Interesting. If there is a system that doesn't have a declaration > but has a definition then the issue is specific to that environment?Like I said I think that's what was going on, but it's not 100% clear (the reporter said they did not have HAVE_MEMMEM, but in that case I would have expected the old "#ifndef HAVE_MEMMEM" to have worked).> Is it expected behavior? I guess No?Well I'd expect a platform to have both declaration and implementation but in the case of having implementation only I'd expect it to cause problems in LP64 platforms. There's a lot of weirdness out there. -- 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.
bugzilla-daemon at mindrot.org
2021-Apr-23  04:57 UTC
[Bug 3152] #ifdef around memmem() is invalid.
https://bugzilla.mindrot.org/show_bug.cgi?id=3152
Damien Miller <djm at mindrot.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED
--- Comment #4 from Damien Miller <djm at mindrot.org> ---
closing resolved bugs as of 8.6p1 release
-- 
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.