ports/net/samba47/files/patch-source3__lib__util.c
Timur I. Bakeyev 6b4c4bd993 Port of the latest stable Samba 4.7.3. With, hopefully, working ZFS provisioning and other fixes of long standing bugs.
Still experimental and version 4.7.4 is coming shortly, so test before putting into production.

Happy birthday release.

Sponsored by:	iXsystems Inc.
2017-12-17 06:43:52 +00:00

16 lines
499 B
C

Signed-off-by: Alexander Zagrebin <alex@zagrebin.ru>
--- source3/lib/util.c.orig 2017-12-17 05:35:49 UTC
+++ source3/lib/util.c 2017-12-17
@@ -2036,7 +2036,10 @@ bool any_nt_status_not_ok(NTSTATUS err1,
int timeval_to_msec(struct timeval t)
{
- return t.tv_sec * 1000 + (t.tv_usec+999) / 1000;
+ unsigned long result;
+
+ result = t.tv_sec * 1000 + (t.tv_usec+999) / 1000;
+ return result > INT_MAX ? INT_MAX : result;
}
/*******************************************************************