Hi,

I have submitted the bug upstream[1] here, and the patch contains
(long long int) cast as it would not be compiled otherwise.
The Ubuntu patch also contains a cast[2].
I apologise for not forwarding the patch correctly. I have attached
the patch forwarded upstream.

Best Regards,
 Vladimir.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=218540
[2] 
https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/nfs-utils/1:2.6.4-3ubuntu4/nfs-utils_2.6.4-3ubuntu4.debian.tar.xz
Description: cast to a type with a known size to ensure sprintf works
Author: Vladimir Petko <vladimir.pe...@canonical.com>
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=218540
Bug-Ubuntu:  https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/2055349
Last-Update: 2024-02-29
--- a/support/junction/export-cache.c
+++ b/support/junction/export-cache.c
@@ -107,7 +107,7 @@
 		xlog(D_GENERAL, "%s: time(3) failed", __func__);
 		return FEDFS_ERR_SVRFAULT;
 	}
-	snprintf(flushtime, sizeof(flushtime), "%ld\n", now);
+	snprintf(flushtime, sizeof(flushtime), "%lld\n", (long long int)now);
 
 	for (i = 0; junction_proc_files[i] != NULL; i++) {
 		retval = junction_write_time(junction_proc_files[i], flushtime);

Reply via email to