Bug 3293 - Check if MAX is already defined in memmem.c
Summary: Check if MAX is already defined in memmem.c
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: 8.5p1
Hardware: Other Windows 10
: P5 minor
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_8_6
  Show dependency treegraph
 
Reported: 2021-04-08 11:48 AEST by balu
Modified: 2021-04-23 14:57 AEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description balu 2021-04-08 11:48:34 AEST
defines.h already defined MAX, MIN. It first checks if MAX is not defined.
In memmem.c, it's assumed MAX is not defined and we define one more time.

https://github.com/openssh/openssh-portable/blob/d1bd184046bc310c405f45da3614a1dc5b3e521a/defines.h#L487


https://github.com/openssh/openssh-portable/blob/d1bd184046bc310c405f45da3614a1dc5b3e521a/openbsd-compat/memmem.c#L64
Comment 1 Darren Tucker 2021-04-08 13:36:28 AEST
Fixed, thanks for the report.
Comment 2 Damien Miller 2021-04-23 14:57:35 AEST
closing resolved bugs as of 8.6p1 release