diff -rN -u old-flexi-streams/conditions.lisp new-flexi-streams/conditions.lisp
--- old-flexi-streams/conditions.lisp	2009-01-09 22:37:00.000000000 +0200
+++ new-flexi-streams/conditions.lisp	2009-01-09 22:37:00.000000000 +0200
@@ -106,3 +106,8 @@
          :format-control format-control
          :format-arguments format-args
          :external-format external-format))
+
+(define-condition flexi-stream-bound-invalidation-condition (simple-condition)
+  ((request-size :initarg :request-size
+                 :reader flexi-stream-bound-invalidation-condition-request-size))
+  (:documentation "Signaled when a read operation exceeds given BOUND."))
diff -rN -u old-flexi-streams/decode.lisp new-flexi-streams/decode.lisp
--- old-flexi-streams/decode.lisp	2009-01-09 22:37:00.000000000 +0200
+++ new-flexi-streams/decode.lisp	2009-01-09 22:37:00.000000000 +0200
@@ -116,7 +116,13 @@
                                                                         (the fixnum (- end index))))
                                                          reserve))
                                           +buffer-size+)))
-                        (cond (bound (min minimum (- bound position)))
+                        (cond (bound
+                               (let ((remaining (- bound position)))
+                                 (cond ((< remaining minimum)
+                                        (signal 'flexi-stream-bound-invalidation-condition
+                                                :request-size minimum)
+                                        remaining)
+                                       (t minimum))))
                               (t minimum))))
                     (fill-buffer (end)
                       "Tries to fill the buffer from BUFFER-POS to END and
diff -rN -u old-flexi-streams/input.lisp new-flexi-streams/input.lisp
--- old-flexi-streams/input.lisp	2009-01-09 22:37:00.000000000 +0200
+++ new-flexi-streams/input.lisp	2009-01-09 22:37:00.000000000 +0200
@@ -47,6 +47,7 @@
              (type (or null integer) bound))
     (when (and bound
                (>= position bound))
+      (signal 'flexi-stream-bound-invalidation-condition :request-size 1)aa
       (return-from read-byte* nil))
     (incf position)
     (or (pop octet-stack)
@@ -67,6 +68,7 @@
              (type (or null integer) bound))
     (when (and bound
                (>= position bound))
+      (signal 'flexi-stream-bound-invalidation-condition :request-size 1)
       (return-from read-byte* nil))
     (incf position)
     (or (pop octet-stack)
@@ -88,6 +90,7 @@
              (type (or null integer) bound))
     (when (and bound
                (>= position bound))
+      (signal 'flexi-stream-bound-invalidation-condition :request-size 1)
       (return-from read-byte* nil))
     (incf position)
     (or (pop octet-stack)
diff -rN -u old-flexi-streams/packages.lisp new-flexi-streams/packages.lisp
--- old-flexi-streams/packages.lisp	2009-01-09 22:37:00.000000000 +0200
+++ new-flexi-streams/packages.lisp	2009-01-09 22:37:00.000000000 +0200
@@ -56,6 +56,8 @@
            :flexi-io-stream
            :flexi-stream
            :flexi-stream-bound
+           :flexi-stream-bound-invalidation-condition
+           :flexi-stream-bound-invalidation-condition-request-size
            :flexi-stream-column
            :flexi-stream-external-format
            :flexi-stream-element-type

