NetBSD Problem Report #55443

From www@netbsd.org  Wed Jul  1 17:08:51 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 07E9C1A9217
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  1 Jul 2020 17:08:51 +0000 (UTC)
Message-Id: <20200701170850.4C4771A9218@mollari.NetBSD.org>
Date: Wed,  1 Jul 2020 17:08:50 +0000 (UTC)
From: jnaman806@gmail.com
Reply-To: jnaman806@gmail.com
To: gnats-bugs@NetBSD.org
Subject: setcchar() incorrectly sets the number of elements in cchar
X-Send-Pr-Version: www-1.0

>Number:         55443
>Category:       lib
>Synopsis:       setcchar() incorrectly sets the number of elements in cchar
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 01 17:10:00 +0000 2020
>Closed-Date:    Mon Jul 06 22:42:04 +0000 2020
>Last-Modified:  Mon Jul 06 23:30:02 +0000 2020
>Originator:     Naman Jain
>Release:        NetBSD 9.0
>Organization:
IIT Kanpur
>Environment:
NetBSD localhost 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
The wcval->elements = 1; should be replaced with the length of wch[]
in setcchar().

>How-To-Repeat:

>Fix:
Replace
wcval->elements = 1;
to
wcval->elements = len;
in setcchar() in cchar.c in libcurses. 

>Release-Note:

>Audit-Trail:
From: "Valeriy E. Ushakov" <uwe@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55443 CVS commit: src/lib/libcurses
Date: Thu, 2 Jul 2020 23:43:01 +0000

 Module Name:	src
 Committed By:	uwe
 Date:		Thu Jul  2 23:43:01 UTC 2020

 Modified Files:
 	src/lib/libcurses: cchar.c

 Log Message:
 setcchar - don't lose combining marks to a typo.

 We copy len wchars but set the length field to 1, instead of len.
 From Naman Jain in PR lib/55443


 To generate a diff of this commit:
 cvs rdiff -u -r1.11 -r1.12 src/lib/libcurses/cchar.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Fri, 03 Jul 2020 02:49:53 +0000
State-Changed-Why:
Does the fix applied by uwe@ address this for you?

From: Naman Jain <jnaman806@gmail.com>
To: gnats-bugs@gnats.netbsd.org
Cc: 
Subject: Re: lib/55443
Date: Mon, 6 Jul 2020 22:30:10 +0530

 --00000000000066949805a9c8cf02
 Content-Type: text/plain; charset="UTF-8"

 I didn't actually find out where this bug might be affecting. This came to
 my sight as I was going through the library code. Will surely notify the
 org as and when I come through where this bug might be an issue.

 --00000000000066949805a9c8cf02
 Content-Type: text/html; charset="UTF-8"

 <div dir="ltr">I didn&#39;t actually find out where this bug might be affecting. This came to my sight as I was going through the library code. Will surely notify the org as and when I come through where this bug might be an issue.</div>

 --00000000000066949805a9c8cf02--

State-Changed-From-To: feedback->closed
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Mon, 06 Jul 2020 22:42:04 +0000
State-Changed-Why:
Closing, assume fixed. Thanks for the PR!

From: "David H. Gutteridge" <david@gutteridge.ca>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: lib/55443 (setcchar() incorrectly sets the number of elements
 in cchar)
Date: Mon, 06 Jul 2020 19:28:57 -0400

 On Mon, 2020-07-06 at 22:42 +0000, gutteridge@NetBSD.org wrote:
 > Synopsis: setcchar() incorrectly sets the number of elements in cchar
 > 
 > State-Changed-From-To: feedback->closed
 > State-Changed-By: gutteridge@NetBSD.org
 > State-Changed-When: Mon, 06 Jul 2020 22:42:04 +0000
 > State-Changed-Why:
 > Closing, assume fixed. Thanks for the PR!

 I should have added, if there is indeed a significant bug found
 associated here, we can always re-open this and submit a pullup
 request.

 Dave


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.