Index: uspace/app/bdsh/input.c
===================================================================
--- uspace/app/bdsh/input.c	(revision 21b0013f6c23c704c8e895c883e9e5916cb7de90)
+++ uspace/app/bdsh/input.c	(revision 932c6406cfdb756b055b8a65f21a2a6f60a512ac)
@@ -56,4 +56,6 @@
 #include "tok.h"
 
+#define MAX_PIPES 10U
+
 extern volatile unsigned int cli_quit;
 
@@ -92,5 +94,5 @@
 	tokenizer_t tok;
 	unsigned int i, pipe_count;
-	unsigned int pipe_pos[2];
+	unsigned int pipe_pos[MAX_PIPES];
 	char *redir_from = NULL;
 	char *redir_to = NULL;
@@ -153,5 +155,8 @@
 			break;
 		}
-
+		if (pipe_count > MAX_PIPES) {
+			rc = ENOTSUP;
+			goto finit;
+		}
 	}
 
