NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/55474: wattroff unsets all attributes if passed STANDOUT as argument



>Number:         55474
>Category:       lib
>Synopsis:       wattroff unsets all attributes if passed STANDOUT as argument
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 09 20:15:00 +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@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
The attroff() and wattroff() functions turn off attrs in the current or specified window "without affecting any others".

But if passed STANDOUT (1<<8) as an argument, it turns off all attributes. This is because of usage of wstandend() in line#468 https://github.com/NetBSD/src/blob/161821ccfdc43542c5d7b008a4057f0bcea38217/lib/libcurses/attributes.c#L468 .

wstandend() unsets all the attributes.
>How-To-Repeat:

>Fix:
Use win->wattr &= ~A_STANDOUT;
And why not for underline also? Though for underline both ways will work.



Home | Main Index | Thread Index | Old Index