svn commit: r197726 - head/sys/kern

Bjoern A. Zeeb bz at FreeBSD.org
Sat Oct 3 10:50:01 UTC 2009


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);
 }
 


More information about the svn-src-head mailing list