Subject: lib/18028: libform new_fieldtype misses on AT&T compliance.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rtr@wasabisystems.com>
List: netbsd-bugs
Date: 08/22/2002 11:08:13
>Number:         18028
>Category:       lib
>Synopsis:       libform new_fieldtype misses on AT&T compliance.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 21 18:10:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Tyler Retzlaff
>Release:        NetBSD 1.6E
>Organization:
	None
>Environment:
System: NetBSD elysium 1.6E NetBSD 1.6E (elysium) #0: Tue Aug 6 07:29:42 EST 2002 rtr@elysium:/wasabi/home/source/co/retry/src/sys/arch/i386/compile/elysium i386
Architecture: i386
Machine: i386
>Description:
	
	new_fieldtype() returns NULL if either of it's arguments are NULL this
	does not behave as expected.  

	Refer to 11-96 CUI FMLI & ETI

>How-To-Repeat:

	Use new_fieldtype and pass one of the fp args as NULL.

>Fix:
	I personally would just change the new_fieldtype's implementation
	to do:

	if ((field_check == NULL) && (char_check == NULL))
		return NULL;

	As opposed to the || that is used now.
>Release-Note:
>Audit-Trail:
>Unformatted: