NetBSD-Bugs archive

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

lib/55484: [libcurses] newwin() results into seg fault



>Number:         55484
>Category:       lib
>Synopsis:       [libcurses] newwin() results into seg fault
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 12 17: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:
newwin() results in segfault for the negative value of 'cols'. 
From the man pages:
"Similarly if cols is less than or equal to zero then the number of columns for the window is set to COLS - begin_y + cols."

Consider newwin(0,-1,0,0), it is expected to create a window of LINES-1 lines and COLS-1 cols. But it results into segfault. 
>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index