bug-ncurses
[Top][All Lists]
Advanced

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

libform lacks a bounds check


From: john heasley
Subject: libform lacks a bounds check
Date: Tue, 30 May 2006 16:40:10 -0700
User-agent: Mutt/1.4.2.1i

libform of ncurses 5.5 has a constraint on the number of fields in a form
at 32767 or that of signed short.  But, Connect_Fields() does not check
it's field count (field_cnt) before sorting and such near the end of the
function.

I changed it like so, on line 185:

    182         page_nr++;
    183       fields[field_cnt]->form = form;
    184     }
    185   if (field_cnt == 0 || (short) field_cnt < -1)
    186     RETURN(E_BAD_ARGUMENT);
    187
    188   /* allocate page structures */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]