From e373f7da2c890a1af8f46d444057609b15f3d248 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 10 Jul 2007 22:11:58 +0200 Subject: [PATCH] audioc: fix bufsize This bug was introduced in ae0e4594c6a0312c5b4b4c0bde86f9c12253d11b: We computed the bufsize from the conf struct before initializing it. Fix is trivial. --- audioc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audioc.c b/audioc.c index 89b7b178..e20e887e 100644 --- a/audioc.c +++ b/audioc.c @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) int ret = -E_AUDIOC_SYNTAX, fd; char *cf, *socket_name, *randname = para_tmpname(), *tmpsocket_name = NULL, *buf = NULL, *hn = para_hostname(), *args, *home = para_homedir(); - size_t bufsize = conf.bufsize_arg, loaded = 0; + size_t bufsize, loaded = 0; if (audioc_cmdline_parser(argc, argv, &conf)) goto out; @@ -83,6 +83,7 @@ int main(int argc, char *argv[]) args = conf.inputs_num? concat_args(conf.inputs_num, conf.inputs) : para_strdup("stat"); + bufsize = conf.bufsize_arg; buf = para_malloc(bufsize); if (conf.socket_given) socket_name = para_strdup(conf.socket_arg); -- 2.39.2