delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/03/28/11:24:34

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D8DCE3858D28
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1711639470;
bh=GlXYN3EdJmjYQ6Ix7fE1SLvyVKKxylq7/21izVoVzTo=;
h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=mbpAg7TFcMVXSwqclRUdZwGeVuBB0jW86Tzyaike1DCSatOVWmw8wAlqhDEvR6Z5S
f/I+eyuWwBfZpNf1p36dpmTH9H62p/D1yTAk3AsJj1Yf+vY8ZvGWcNcqRSEvDF4qQW
7mXPoPPbr3tLpbvhnG+OOTPPc/JLPGxKgjIsAiWU=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E6E63858D20
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7E6E63858D20
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711639415; cv=none;
b=I4mQP7GcGSX59ilQcBVsRzf3PhRQeIapLlszw57k7/wp6n13LUdVtAZP0qAl8tjLNsFxrUanlpxOt3CSn3MLnmg5E4aHGpAeAZfCLgG+c+dyaLTUbEvYUwvBIDli1Aawl3259NcZgsmD+KHNEIvyGqdwQOlT3x30Fh+qDzLXDlU=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1711639415; c=relaxed/simple;
bh=djnHpsd/ZCJH2zokmke+KbIPMr8yHz42dVpnmD0zo+Q=;
h=DKIM-Signature:From:To:Subject:Mime-Version:Date:Message-ID;
b=p7xioRvDQ8AJr+GeLs2SxbbPUmbUftpCfonx2uJ6tv3rgcmi00EjcqA5FsIjXY+BJJ3tQ6vkAPG3Zs6cDz60laynEdGJj/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yFd6dFP81QU27aCryoV0AQDSHPtUhP4/pnYG6VFFMylB/yXNfEgja1zj+J/dtWN9kIwSD
ZsQ7lN5LxectFKk5WpPcbJYgSJ+o402if4mea8ff72BNNrk8yeXIA==
X-HAS-ATTACH: no
X-QQ-BUSINESS-ORIGIN: 2
X-Originating-IP: 123.234.15.119
X-QQ-STYLE:
X-QQ-mid: webmail344t1711639408t1629324
To: "=?gb18030?B?Y3lnd2luQGN5Z3dpbi5jb20=?=" <cygwin AT cygwin DOT com>
Subject: When displaying Chinese help information,
the program does not respond. The code enters a dead loop.
Mime-Version: 1.0
Date: Thu, 28 Mar 2024 23:23:28 +0800
X-Priority: 3
Message-ID: <tencent_932C9754B9F016D941AA51316306BAC4DA06@qq.com>
X-QQ-MIME: TCMime 1.0 by Tencent
X-Mailer: QQMail 2.x
X-QQ-Mailer: QQMail 2.x
X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_40,
CHARSET_FARAWAY_HEADER, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF,
FREEMAIL_FROM, GIT_PATCH_0, HELO_DYNAMIC_IPADDR, HTML_MESSAGE,
MIME_CHARSET_FARAWAY, NO_FM_NAME_IP_HOSTN, RCVD_IN_DNSWL_NONE, RDNS_DYNAMIC,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.30
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: =?utf-8?b?6LW15LyfIHZpYSBDeWd3aW4=?= <cygwin AT cygwin DOT com>
Reply-To: =?gb18030?B?1dTOsA==?= <qdzhaov AT qq DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 42SFOXZS3876619

When displaying Chinese help information, the program does not respond.&nbsp;
The code enters a dead loop in file "libgetopt++/include/getopt++/DefaultFormatter.h"£¬Because some Chinese help information does not contain spaces.
diff --git a/libgetopt++/include/getopt++/DefaultFormatter.h b/libgetopt++/include/getopt++/DefaultFormatter.h
index ee2397f5..19ac67e1 100644
--- a/libgetopt++/include/getopt++/DefaultFormatter.h
+++ b/libgetopt++/include/getopt++/DefaultFormatter.h
@@ -64,6 +64,7 @@ class DefaultFormatter {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // TODO: consider using a line breaking strategy here.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int pos = helpmsg.substr(0,h_len).find_last_of(" ");
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(pos<=0)break;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; theStream << helpmsg.substr(0,pos)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; << std::endl << std::string (o_len, ' ');
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; helpmsg.erase (0,pos+1);

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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