# HG changeset patch # User Olaf Wintermann # Date 1504802571 -7200 # Node ID 4e3769d4e782c4eb6a896bcc80240c96e54c8873 # Parent c517502d3e38fe1363cb11ea50efa58dd6f7b7b9 bug fix: file size > 2gb not loaded correctly from database this bug results in large files always pushed, even if they are unmodified diff -r c517502d3e38 -r 4e3769d4e782 dav/db.c --- a/dav/db.c Thu Sep 07 18:18:30 2017 +0200 +++ b/dav/db.c Thu Sep 07 18:42:51 2017 +0200 @@ -152,7 +152,13 @@ break; } case 3: { - res->size = atoi((char*)value); + res->size = 0; + int64_t filelen = 0; + if(util_strtoint((char*)value, &filelen)) { + if(filelen > 0) { + res->size = (size_t)filelen; + } + } break; } }