public inbox for cygwin-apps-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-apps-cvs@sourceware.org Subject: [rebase - The rebase tool, core of the automatic rebase facility during postinstall] branch master, updated. fa4229d7099fbf14e83125fed142c03638574d50 Date: Tue, 8 Aug 2023 08:31:11 +0000 (GMT) [thread overview] Message-ID: <20230808083111.D556C3858D33@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/rebase.git;h=fa4229d7099fbf14e83125fed142c03638574d50 commit fa4229d7099fbf14e83125fed142c03638574d50 Author: Christian Franke <christian.franke@t-online.de> Date: Tue Aug 8 09:58:39 2023 +0200 peflags: Fix ULONG range checks Don't use ULONG_MAX from <limits.h> because ULONG is not necessarily 'unsigned long'. Use MAXULONG32 instead. Signed-off-by: Christian Franke <christian.franke@t-online.de> Diff: --- peflags.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/peflags.c b/peflags.c index f215704dff31..1a61da714d73 100644 --- a/peflags.c +++ b/peflags.c @@ -30,7 +30,6 @@ #include <unistd.h> #include <getopt.h> #include <errno.h> -#include <limits.h> #if defined (__CYGWIN__) || defined (__MSYS__) #include <sys/mman.h> #endif @@ -696,7 +695,7 @@ handle_num_option (const char *option_name, || sizeof_vals[option_index].value > 0x0000ffffffffffffULL /* Just a ULONG value */ || (sizeof_vals[option_index].is_ulong - && sizeof_vals[option_index].value > ULONG_MAX)) + && sizeof_vals[option_index].value > MAXULONG32)) { fprintf (stderr, "Invalid argument for %s: %s\n", option_name, option_arg); @@ -1092,7 +1091,7 @@ get_and_set_size (const pe_file *pep, sizeof_values_t *val) } else if (val->handle == DO_WRITE) { - if ((!pep->is_64bit || val->is_ulong) && val->value >= ULONG_MAX) + if ((!pep->is_64bit || val->is_ulong) && val->value > MAXULONG32) { fprintf (stderr, "%s: Skip writing %s, value too big\n", pep->pathname, val->name);
reply other threads:[~2023-08-08 8:31 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230808083111.D556C3858D33@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-apps-cvs@sourceware.org \ /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: linkBe 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).