diff options
author | jm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2004-07-26 10:26:30 +0400 |
---|---|---|
committer | jm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2004-07-26 10:26:30 +0400 |
commit | d9140e5ba89e99d9349fa46b02dc16f9e1ec72a0 (patch) | |
tree | ea6eaeb70c97fc7b74ffc67a3128889fd4128d54 | |
parent | 0376b3dafa15254ef36de7a565d87bd3f971565e (diff) |
Check that extra comments contain an '='
git-svn-id: http://svn.xiph.org/branches/rel-1-0-branch/speex@7344 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r-- | src/speexenc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/speexenc.c b/src/speexenc.c index 3e6657a..3ea404e 100644 --- a/src/speexenc.c +++ b/src/speexenc.c @@ -363,6 +363,12 @@ int main(int argc, char **argv) rate=atoi (optarg); } else if (strcmp(long_options[option_index].name,"comment")==0) { + if (!strchr(optarg, '=')) + { + fprintf (stderr, "Invalid comment: %s\n", optarg); + fprintf (stderr, "Comments must be of the form name=value\n"); + exit(1); + } comment_add(&comments, &comments_length, NULL, optarg); } else if (strcmp(long_options[option_index].name,"author")==0) { |