Index: /trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp	(revision 56643)
+++ /trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp	(revision 56644)
@@ -825,6 +825,11 @@
     }
 
+    /*
+     * Check how much we can read from the capture device without overflowing
+     * the mixer buffer.
+     */
     Assert(cAvail);
-    size_t cbToRead = AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf, cAvail);
+    size_t cbToRead = RT_MIN(AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf, cAvail),
+                             AudioMixBufFreeBytes(&pHstStrmIn->MixBuf));
 
     LogFlowFunc(("cbToRead=%zu, cAvail=%RI32\n", cbToRead, cAvail));
@@ -886,4 +891,11 @@
                 break;
 
+            /*
+             * We should not run into a full mixer buffer or we loose samples and
+             * run into an endless loop if ALSA keeps producing samples ("null"
+             * capture device for example).
+             */
+            AssertLogRelMsgBreakStmt(cWritten > 0, ("Mixer buffer shouldn't be full at this point!\n"),
+                                     rc = VERR_INTERNAL_ERROR);
             uint32_t cbWritten = AUDIOMIXBUF_S2B(&pHstStrmIn->MixBuf, cWritten);
 
