[Bug 3248] New: SFTP can not sort files by modification time

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Mon Jan 4 22:51:22 AEDT 2021


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

            Bug ID: 3248
           Summary: SFTP can not sort files by modification time
           Product: Portable OpenSSH
           Version: 8.4p1
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: sftp
          Assignee: unassigned-bugs at mindrot.org
          Reporter: jjelen at redhat.com

Created attachment 3463
  --> https://bugzilla.mindrot.org/attachment.cgi?id=3463&action=edit
proposed patch from Red Hat Bug

Originally reported as Red Hat Bug with patch:

https://bugzilla.redhat.com/show_bug.cgi?id=1909988

When sorting files based on the modification time from remote glob in
the client SFTP, the return values from sglob_comp() is wrong (1 or 0
and 0 or -1 with -r flag) causing the files are incorrectly sorted
inside of the qsort, which expects -1, 0 or 1. For more information,
see the analysis in the above bug.

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


More information about the openssh-bugs mailing list