[PATCH] cygutils-extra 1.4.16-3: cygdrop: Fix printf format strings
Christian Franke
Christian.Franke@t-online.de
Sat Aug 14 13:57:14 GMT 2021
This fixes an unrelated bug found during analysis of the cygdrop crash.
In theory, the bug affects the 64-bit version (which didn't exist when I
contributed this tool in 2009).
In practice, it doesn't because 64-bit ABI uses registers to pass the
first args of a va_list.
Regards,
Christian
-------------- next part --------------
From 4cf442906ea9654543dd6683960993361f02e525 Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Sat, 14 Aug 2021 15:14:27 +0200
Subject: [PATCH] cygdrop: Fix printf format strings.
---
src/cygdrop/cygdrop.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cygdrop/cygdrop.cc b/src/cygdrop/cygdrop.cc
index dc403c9..0c036bb 100644
--- a/src/cygdrop/cygdrop.cc
+++ b/src/cygdrop/cygdrop.cc
@@ -378,7 +378,7 @@ main (int argc, char **argv)
? " [logon_id]" : ""));
const struct group * g = strsid_to_group (strsid);
if (g)
- printf (" gid=%lu(%s)", g->gr_gid, g->gr_name);
+ printf (" gid=%u(%s)", (unsigned) g->gr_gid, g->gr_name);
printf ("\n");
}
@@ -415,7 +415,7 @@ main (int argc, char **argv)
printf ("r %s", strsid);
const struct group * g = strsid_to_group (strsid);
if (g)
- printf (" gid=%lu(%s)", g->gr_gid, g->gr_name);
+ printf (" gid=%u(%s)", (unsigned) g->gr_gid, g->gr_name);
printf ("\n");
}
--
2.32.0
More information about the Cygwin
mailing list