[xiph-commits] r7343 - trunk/speex/src

jm at dactyl.lonelymoon.com jm
Sun Jul 25 23:24:32 PDT 2004


Author: jm
Date: Sun Jul 25 23:24:32 2004
New Revision: 7343

Modified:
trunk/speex/src/speexenc.c
Log:
Rejects extra comments that break the spec (i.e. those that don't contain
an '=')


Modified: trunk/speex/src/speexenc.c
===================================================================
--- trunk/speex/src/speexenc.c	2004-07-26 03:20:21 UTC (rev 7342)
+++ trunk/speex/src/speexenc.c	2004-07-26 06:24:30 UTC (rev 7343)
@@ -388,6 +388,12 @@
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)
{



More information about the commits mailing list