From: Christian Franke <Christian.Franke@t-online.de>
To: cygwin@cygwin.com
Subject: [PATCH] cygutils-extra 1.4.16-3: cygdrop: Fix printf format strings
Date: Sat, 14 Aug 2021 15:57:14 +0200 [thread overview]
Message-ID: <403c766b-5937-a0e8-7574-98211331cb36@t-online.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 296 bytes --]
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
[-- Attachment #2: 0001-cygdrop-Fix-printf-format-strings.patch --]
[-- Type: text/plain, Size: 1037 bytes --]
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
next reply other threads:[~2021-08-14 13:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-14 13:57 Christian Franke [this message]
2021-08-14 21:23 ` Mark Geisert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=403c766b-5937-a0e8-7574-98211331cb36@t-online.de \
--to=christian.franke@t-online.de \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).