Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Oct 2009 10:50:00 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r197726 - head/sys/kern
Message-ID:  <200910031050.n93Ao0th038513@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Sat Oct  3 10:50:00 2009
New Revision: 197726
URL: http://svn.freebsd.org/changeset/base/197726

Log:
  Print a warning in case we cannot add more brandinfo because
  we would overflow the MAX_BRANDS sized array.
  
  Reviewed by:	kib
  MFC After:	1 month

Modified:
  head/sys/kern/imgact_elf.c

Modified: head/sys/kern/imgact_elf.c
==============================================================================
--- head/sys/kern/imgact_elf.c	Sat Oct  3 02:37:21 2009	(r197725)
+++ head/sys/kern/imgact_elf.c	Sat Oct  3 10:50:00 2009	(r197726)
@@ -180,8 +180,11 @@ __elfN(insert_brand_entry)(Elf_Brandinfo
 			break;
 		}
 	}
-	if (i == MAX_BRANDS)
+	if (i == MAX_BRANDS) {
+		printf("WARNING: %s: could not insert brandinfo entry: %p\n",
+			__func__, entry);
 		return (-1);
+	}
 	return (0);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910031050.n93Ao0th038513>