diff --git a/audio/2.0/default/StreamIn.cpp b/audio/2.0/default/StreamIn.cpp
index 59029be..9feef15 100644
--- a/audio/2.0/default/StreamIn.cpp
+++ b/audio/2.0/default/StreamIn.cpp
@@ -334,8 +334,21 @@
         return Void();
     }
     std::unique_ptr<CommandMQ> tempCommandMQ(new CommandMQ(1));
-    if (frameSize > std::numeric_limits<size_t>::max() / framesCount) {
-        ALOGE("Requested buffer is too big, %d*%d can not fit in size_t",
+
+    // Check frameSize and framesCount
+    if (frameSize == 0 || framesCount == 0) {
+        ALOGE("Null frameSize (%u) or framesCount (%u)", frameSize,
+              framesCount);
+        sendError(Result::INVALID_ARGUMENTS);
+        return Void();
+    }
+    // A message queue asserts if it can not handle the requested buffer,
+    // thus the client has to guess the maximum size it can handle
+    // Choose an arbitrary margin for the overhead of a message queue
+    size_t metadataOverhead = 100000;
+    if (frameSize >
+        (std::numeric_limits<size_t>::max() - metadataOverhead) / framesCount) {
+        ALOGE("Buffer too big: %u*%u bytes can not fit in a message queue",
               frameSize, framesCount);
         sendError(Result::INVALID_ARGUMENTS);
         return Void();
diff --git a/audio/2.0/default/StreamOut.cpp b/audio/2.0/default/StreamOut.cpp
index fc055be..eb53259 100644
--- a/audio/2.0/default/StreamOut.cpp
+++ b/audio/2.0/default/StreamOut.cpp
@@ -311,11 +311,22 @@
     }
     std::unique_ptr<CommandMQ> tempCommandMQ(new CommandMQ(1));
 
-    if (frameSize > std::numeric_limits<size_t>::max() / framesCount) {
-        ALOGE("Requested buffer is too big, %d*%d can not fit in size_t",
+    // Check frameSize and framesCount
+    if (frameSize == 0 || framesCount == 0) {
+        ALOGE("Null frameSize (%u) or framesCount (%u)", frameSize,
+              framesCount);
+        sendError(Result::INVALID_ARGUMENTS);
+        return Void();
+    }
+    // A message queue asserts if it can not handle the requested buffer,
+    // thus the client has to guess the maximum size it can handle
+    size_t metadataOverhead =
+        100000;  // Arbitrary margin for the overhead of a message queue
+    if (frameSize >
+        (std::numeric_limits<size_t>::max() - metadataOverhead) / framesCount) {
+        ALOGE("Buffer too big: %u*%u bytes can not fit in a message queue",
               frameSize, framesCount);
-        _hidl_cb(Result::INVALID_ARGUMENTS, CommandMQ::Descriptor(),
-                 DataMQ::Descriptor(), StatusMQ::Descriptor(), threadInfo);
+        sendError(Result::INVALID_ARGUMENTS);
         return Void();
     }
     std::unique_ptr<DataMQ> tempDataMQ(
