Author: bz
Date: Sat Dec  5 20:40:28 2009
New Revision: 200164
URL: http://svn.freebsd.org/changeset/base/200164

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

Modified:
  stable/8/sys/kern/imgact_elf.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/kern/imgact_elf.c
==============================================================================
--- stable/8/sys/kern/imgact_elf.c      Sat Dec  5 20:37:46 2009        
(r200163)
+++ stable/8/sys/kern/imgact_elf.c      Sat Dec  5 20:40:28 2009        
(r200164)
@@ -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);
 }
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to