public inbox for bzip2-devel@sourceware.org
 help / color / mirror / Atom feed
From: "roland.illig at gmx dot de" <sourceware-bugzilla@sourceware.org>
To: bzip2-devel@sourceware.org
Subject: [Bug bzip2/28283] New: undefined behavior for isdigit and isspace
Date: Fri, 27 Aug 2021 17:31:37 +0000	[thread overview]
Message-ID: <bug-28283-11876@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=28283

            Bug ID: 28283
           Summary: undefined behavior for isdigit and isspace
           Product: bzip2
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: bzip2
          Assignee: nobody at sourceware dot org
          Reporter: roland.illig at gmx dot de
                CC: bzip2-devel at sourceware dot org
  Target Milestone: ---

The functions from <ctype.h> take an int as parameter. The value of this
parameter must "either be representable as an unsigned char or be the value of
the macro EOF".

The functions addFlagsFromEnvVar and bzopen_or_bzdopen wrongly cast the
argument to Int32, the correct type is UChar. After a direct cast to Int32, the
argument may still be negative, which makes that cast wrong.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2021-08-27 17:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27 17:31 roland.illig at gmx dot de [this message]
2022-12-27 12:34 ` [Bug bzip2/28283] " pmqs at outlook dot com
2022-12-27 17:24 ` mark at klomp dot org
2024-04-09 13:31 ` email at arsoftware dot net.br
2024-04-09 19:19 ` mark at klomp dot org

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=bug-28283-11876@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=bzip2-devel@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: 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).