-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timestamp overflow problem #708
Comments
Hi @rlnsh, Can you please provide more specifics as to what sort of defect you believe is present in JSch? Thanks, |
In the SftpATTRS class, the mtime and atime fields are int type, and the maximum value is 2147483647. If the server time is changed to January 20, 2038, the obtained mtime and atime are negative values, and the time rollback occurs. |
Hi @rlnsh, You are aware that this fields are specified in the SFTP standard to which JSch adheres as Thanks, |
ok, i see, Thanks! |
The uint32 in the c language in sftp has an unsigned bit and its maximum value is 4294967295. Therefore, java receives packets of the long type. |
I'm not sure what point you are attempting to make? |
If the file date is January 20, 2038, but the mtime obtained by SftpATTRS is incorrect, the timestamp returns a negative number. |
It's the caller's responsibility to correctly interpret the |
The jsch library will get the modified time of the file will have a timestamp overflow problem, such as after January 19, 2038, will have a negative timestamp time rollback problem. Hope the author can fix the problem next time, tTime field is currently an int and needs to be adjusted to a long type.
The text was updated successfully, but these errors were encountered: