file system servers must not use null tx buffers

Fixes #1534
This commit is contained in:
Emery Hemingway
2015-05-20 10:13:31 -04:00
committed by Christian Helmuth
parent e081554731
commit 5fc8ed3e6b
7 changed files with 42 additions and 7 deletions

View File

@ -337,8 +337,8 @@ class File_system::Root : public Root_component<Session_component>
char root[ROOT_MAX_LEN];
root[0] = 0;
Session_label label(args);
try {
Session_label label(args);
Session_policy policy(label);
/*
@ -385,6 +385,11 @@ class File_system::Root : public Root_component<Session_component>
size_t tx_buf_size =
Arg_string::find_arg(args, "tx_buf_size").ulong_value(0);
if (!tx_buf_size) {
PERR("%s requested a session with a zero length transmission buffer", label.string());
throw Root::Invalid_args();
}
/*
* Check if donated ram quota suffices for session data,
* and communication buffer.