delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/01/07/20:49:59

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4D27C2B9.5090706@redhat.com>
Date: Fri, 07 Jan 2011 18:49:45 -0700
From: Eric Blake <eblake AT redhat DOT com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: New version of w3m 0.5.2 Crashes - GDB help needed (SOLVED)
References: <461v5l46ht DOT fsf AT aol DOT com> <AANLkTimCHO=nJhnSuZDwkkRAH24Fq6vDZbJCothHX1zD AT mail DOT gmail DOT com> <81wrnaad66 DOT fsf AT aol DOT com> <AANLkTintjW8ckzp54shjmc+yQ7y-5Ev6Ap4q_qb8Xgg6 AT mail DOT gmail DOT com> <AANLkTikPoADsgJ2w2PAUdF1Wv5G+gUgRAs6yutTrXf7F AT mail DOT gmail DOT com> <46wrn4vv0i DOT fsf AT aol DOT com> <4662u3aw5m DOT fsf_-_ AT aol DOT com> <20110105212218 DOT GA21238 AT ednor DOT casa DOT cgf DOT cx> <AANLkTi=JN2w_Q3yz29GMo2trvH--aG9PES2pn9fXwZtY AT mail DOT gmail DOT com> <46d3o9lfut DOT fsf AT aol DOT com> <81wrmg42wv DOT fsf_-_ AT aol DOT com>
In-Reply-To: <81wrmg42wv.fsf_-_@aol.com>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

--------------enigAB8C7EC999B715AC3B18BF34
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 01/07/2011 06:09 PM, nyc4bos AT aol DOT com wrote:
> It appears that it crashes if LANG is not defined
>=20
> When function term.c:check_cygwin_console:239 is called and
> the following is evaluated with environment variable LANG undefined:
>=20
> 	if (strncmp(getenv("LANG"), "ja", 2) =3D=3D 0) {

Yep, getenv() is allowed to return NULL for unset vars, and
strncmp(NULL) is undefined behavior (typically a crash).  The fix is to
correct the code to check that getenv() returned something before
blindly handing it to strncmp.

--=20
Eric Blake   eblake AT redhat DOT com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enigAB8C7EC999B715AC3B18BF34
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNJ8K5AAoJEKeha0olJ0NqtQYIAJoMD9D+Wx44X7Ewq5f0YimU
p/XA/NLguuRMQLcXXJ+ebtL/uFjbgaSXYHHLJU0ewp7BKJuD+BZ2ZVoUA1ZwFYXw
8oJfhSGKgXd4dgRuWABBJx3k7LKCMy2zvU3IYyRJxe0dvyJTeUvxhVKh2Nk3k9Hc
m0+tbgOR6aN5hbry8eb6qGqu60KikgElc1tO3AWrmPKjcKwETS20FO3tBQNtLfAe
lD9ME0ZyWUWQMwSJM4M70Wdb1zwMj/Q4NplsG9n8vRCTCKn2N4j6gnWVniCFyBfR
sZjje9gWNBuBT90FbvgqPUFAZLagCYxAsJt1MN4OTKnB0SYMCpT67q1MZM8FcOY=
=QUN3
-----END PGP SIGNATURE-----

--------------enigAB8C7EC999B715AC3B18BF34--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019