The Samba-Bugzilla – Attachment 9998 Details for
Bug 10643
cmp_time() returns incorrect result due to integer overflow
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to change cmp_time() to use difftime(3)
cmp_time.diff (text/plain), 574 bytes, created by
William Hooper
on 2014-05-31 01:38:26 UTC
(
hide
)
Description:
Patch to change cmp_time() to use difftime(3)
Filename:
MIME Type:
Creator:
William Hooper
Created:
2014-05-31 01:38:26 UTC
Size:
574 bytes
patch
obsolete
>diff -rupN rsync-3.1.1pre1.orig/util.c rsync-3.1.1pre1/util.c >--- rsync-3.1.1pre1.orig/util.c 2014-01-26 17:29:15.000000000 +0000 >+++ rsync-3.1.1pre1/util.c 2014-05-31 01:26:17.525693440 +0000 >@@ -1318,14 +1318,14 @@ char *timestring(time_t t) > **/ > int cmp_time(time_t file1, time_t file2) > { >- if (file2 > file1) { >- if (file2 - file1 <= modify_window) >- return 0; >+ double d = difftime(file1, file2); >+ >+ if (d > modify_window) >+ return 1; >+ else if (d < -modify_window) > return -1; >- } >- if (file1 - file2 <= modify_window) >+ else > return 0; >- return 1; > } > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 10643
: 9998