[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r14482 - in trunk/subversion: mod_dav_svn

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-05-10 13:55:24 CEST

>>Author: sussman
>>Date: Wed Apr 27 14:42:27 2005
>>New Revision: 14482
>>
>>Modified:
>> trunk/subversion/libsvn_fs/fs-loader.c
>> trunk/subversion/mod_dav_svn/lock.c
>>
>>Log:
>>mod_dav_svn bugfix: prevent lock creation/expiration dates from overflowing.
>>And don't a allow negative expiration date into svn_fs_lock().
>>
>>* subversion/mod_dav_svn/lock.c
>> (svn_lock_to_dav_lock): divide 64-bit int by 1000 before casting to 32-bit.
>> (dav_lock_to_svn_lock): cast to 64-bit int before mulitplying by 1000.

Since when have there been 1000 microseconds in a second?

- Julian

>>- lock->timeout = (time_t)slock->expiration_date / APR_USEC_PER_SEC;
>>+ lock->timeout = (time_t) (slock->expiration_date / APR_USEC_PER_SEC);

>>- lock->expiration_date = (apr_time_t)dlock->timeout * APR_USEC_PER_SEC;
>>+ lock->expiration_date = ((apr_time_t)dlock->timeout) * APR_USEC_PER_SEC;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 10 13:56:31 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.