/* Don't accept more connection than this */
#define MAX_CONNECTIONS 10
+#define MAX_MEMBLOCKQ_LENGTH (4*1024*1024) /* 4MB */
+
struct connection;
struct pa_protocol_native;
[PA_COMMAND_GET_AUTOLOAD_INFO] = command_get_autoload_info,
[PA_COMMAND_GET_AUTOLOAD_INFO_LIST] = command_get_autoload_info_list,
[PA_COMMAND_ADD_AUTOLOAD] = command_add_autoload,
- [PA_COMMAND_REMOVE_AUTOLOAD] = command_remove_autoload,
-
+ [PA_COMMAND_REMOVE_AUTOLOAD] = command_remove_autoload
};
/* structure management */
CHECK_VALIDITY(c->pstream, name, tag, PA_ERR_ACCESS);
CHECK_VALIDITY(c->pstream, sink_index != PA_INVALID_INDEX || !sink_name || *sink_name, tag, PA_ERR_INVALID);
CHECK_VALIDITY(c->pstream, map.channels == ss.channels && volume.channels == ss.channels, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, maxlength <= MAX_MEMBLOCKQ_LENGTH, tag, PA_ERR_INVALID);
if (sink_index != PA_INVALID_INDEX)
sink = pa_idxset_get_by_index(c->protocol->core->sinks, sink_index);
CHECK_VALIDITY(c->pstream, name, tag, PA_ERR_INVALID);
CHECK_VALIDITY(c->pstream, source_index != PA_INVALID_INDEX || !source_name || *source_name, tag, PA_ERR_INVALID);
CHECK_VALIDITY(c->pstream, map.channels == ss.channels, tag, PA_ERR_INVALID);
+ CHECK_VALIDITY(c->pstream, maxlength <= MAX_MEMBLOCKQ_LENGTH, tag, PA_ERR_INVALID);
if (source_index != PA_INVALID_INDEX)
source = pa_idxset_get_by_index(c->protocol->core->sources, source_index);