lsearch() could return garbage objects
authorAri Johnson <ari@cobramush.org>
Wed, 21 Feb 2007 14:29:32 +0000 (14:29 +0000)
committerAri Johnson <ari@cobramush.org>
Wed, 21 Feb 2007 14:29:32 +0000 (14:29 +0000)
src/wiz.c

index f0af0d430563030bfabd555fd44cf9fbdefcc776..0eb83219df21e4c1f190103be5c9f3bb78197b4b 100644 (file)
--- a/src/wiz.c
+++ b/src/wiz.c
@@ -1992,6 +1992,8 @@ raw_search(dbref player, const char *owner, int nargs, const char **args,
     mush_panic(T("Couldn't allocate memory in search!"));
   
   for (n = spec.low; n <= spec.high; n++) {
+    if (IsGarbage(n))
+      continue;
     if (spec.owner == ANY_OWNER && !CanSearch(player, Owner(n)))
       continue;
     if (spec.owner != ANY_OWNER && Owner(n) != spec.owner)