Print this page
10118 libeti() NULL check after deref
*** 26,36 ****
/*
* Copyright (c) 1997, by Sun Microsystems, Inc.
* All rights reserved.
*/
! #pragma ident "%Z%%M% %I% %E% SMI"
/*LINTLIBRARY*/
#include <sys/types.h>
#include <stdlib.h>
--- 26,38 ----
/*
* Copyright (c) 1997, by Sun Microsystems, Inc.
* All rights reserved.
*/
! /*
! * Copyright (c) 2018, Joyent, Inc.
! */
/*LINTLIBRARY*/
#include <sys/types.h>
#include <stdlib.h>
*** 335,347 ****
*/
int
set_max_field(FIELD *f, int max)
{
! BOOLEAN onerow = OneRow(f);
! if (!f || max && ((onerow && f->dcols > max) ||
(!onerow && f->drows > max)))
return (E_BAD_ARGUMENT);
f->maxgrow = max;
Clr(f, GROWABLE);
--- 337,354 ----
*/
int
set_max_field(FIELD *f, int max)
{
! BOOLEAN onerow;
! if (!f)
! return (E_BAD_ARGUMENT);
!
! onerow = OneRow(f);
!
! if (max && ((onerow && f->dcols > max) ||
(!onerow && f->drows > max)))
return (E_BAD_ARGUMENT);
f->maxgrow = max;
Clr(f, GROWABLE);