From: Eric Gillespie <epg@pretzelnet.org>
Date: Thu, 14 Aug 2008 01:31:11 +0000 (+0000)
Subject: 	* uip/pick.c: Ensure valid sequence name as soon as we parse it from
X-Git-Tag: PRE_POSIX_CONVERSION~26
X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=528f017cdebf19e2868bb77891e28e628defd13c;p=mmh

	* uip/pick.c: Ensure valid sequence name as soon as we parse it from
	command, instead of searching the messages first.
---

diff --git a/ChangeLog b/ChangeLog
index 969241f7..f3eb541b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
 	* uip/pick.c: Print matching messages immediately, instead of
 	waiting until the very end to print anything.
+	Ensure valid sequence name as soon as we parse it from command,
+	instead of searching the messages first.
 
 2008-08-13  Eric Gillespie  <epg@pretzelnet.org>
 
diff --git a/uip/pick.c b/uip/pick.c
index 7aa48700..e0d61368 100644
--- a/uip/pick.c
+++ b/uip/pick.c
@@ -153,6 +153,10 @@ main (int argc, char **argv)
 		/* check if too many sequences specified */
 		if (seqp >= NUMATTRS)
 		    adios (NULL, "too many sequences (more than %d) specified", NUMATTRS);
+
+                if (!seq_nameok (cp))
+                  done (1);
+
 		seqs[seqp++] = cp;
 		continue;
 	    case PUBLSW: