[Bug 2977] New: misc.c convtime() LONG_MAX is no longer allowed

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Tue Mar 12 03:54:39 AEDT 2019


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

            Bug ID: 2977
           Summary: misc.c convtime() LONG_MAX is no longer allowed
           Product: Portable OpenSSH
           Version: -current
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5
         Component: sshd
          Assignee: unassigned-bugs at mindrot.org
          Reporter: kirk at dovetail.com

Revisions 1.108 and 1.109 changed convtime() to fix an overflow issue,
but it was also changed so that LONG_MAX is no longer a valid value.

1.109 seemed to explicitly "fix" this, but I do not believe that this
is correct.

For example, there *should* be a unittest/conversion/test.c:

/* maximum value */
snprintf(buf, sizeof buf, "%lu", LONG_MAX);
ASSERT_LONG_EQ(convtime(buf), LONG_MAX);

-- this test currently fails.

PS>
We noticed this because we had some oddball user that was using
2147483647  (LONG_MAX) as ClientAliveInterval.  Even though this was
not a useful setting, they now receive an error for this value.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list