diff --git a/ChangeLog b/ChangeLog
index d003e273d16f6cf0b8bd2996a94294d47e5eff30..8fe9cb7589197feb347333fee80ef47c1e0f1e5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,10 @@ Changes in version 0.2.1.14-??? - 2009-03-??
       0.2.0.33.
     - Avoid double-free on list of successfully uploaded hidden
       service discriptors.  Fix for bug 948.  Bugfix on 0.2.1.6-alpha.
+    - Change memarea_strndup() implementation to work even when
+      duplicating a string at the end of a page.  This bug was
+      harmless for now, but could have meant crashes later. Fix by
+      lark.  Bugfix on 0.2.1.1-alpha.
 
   o Minor features (controller):
     - Try harder to look up nicknames for routers on a circuit when
diff --git a/src/common/memarea.c b/src/common/memarea.c
index 65e36e3dd96b7674dc31a16b8f2b789d33d4e0b5..7eb54821b970b31eb64c9edd242522a63e8c8f57 100644
--- a/src/common/memarea.c
+++ b/src/common/memarea.c
@@ -237,7 +237,7 @@ memarea_strndup(memarea_t *area, const char *s, size_t n)
   size_t ln;
   char *result;
   const char *cp, *end = s+n;
-  for (cp = s; *cp && cp < end; ++cp)
+  for (cp = s; cp < end && *cp; ++cp)
     ;
   /* cp now points to s+n, or to the 0 in the string. */
   ln = cp-s;