diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-08-27 11:05:21 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-08-27 11:05:21 +0000 |
commit | 635edfa7d586b89255d9d5fc64e85d88b6343f56 (patch) | |
tree | ad7393dba8a1fd28d13f9458bad1cb716d56947c /input.c | |
parent | 228ec26d10ddeb2241499b3876886146b22cea27 (diff) | |
download | rtmux-635edfa7d586b89255d9d5fc64e85d88b6343f56.tar.gz rtmux-635edfa7d586b89255d9d5fc64e85d88b6343f56.tar.bz2 rtmux-635edfa7d586b89255d9d5fc64e85d88b6343f56.zip |
Don't accept zero titles.
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: input.c,v 1.2 2007-08-27 08:12:23 nicm Exp $ */ +/* $Id: input.c,v 1.3 2007-08-27 11:05:21 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -438,8 +438,10 @@ input_pair_control(u_char **buf, size_t *len, if (**buf == ';' && (ch == '0' || ch == '1')) { log_debug("title found, length %zu bytes: %.*s", size - 1, (int) size - 1, *buf + 1); - input_store_one(b, CODE_TITLE, size - 1); - buffer_write(b, *buf + 1, size - 1); + if (size > 1) { + input_store_one(b, CODE_TITLE, size - 1); + buffer_write(b, *buf + 1, size - 1); + } } /* Skip the title; add one for the \007. */ |