* uip/pick.c: Ensure valid sequence name as soon as we parse it from
authorEric Gillespie <epg@pretzelnet.org>
Thu, 14 Aug 2008 01:31:11 +0000 (01:31 +0000)
committerEric Gillespie <epg@pretzelnet.org>
Thu, 14 Aug 2008 01:31:11 +0000 (01:31 +0000)
command, instead of searching the messages first.

ChangeLog
uip/pick.c

index 969241f..f3eb541 100644 (file)
--- 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>
 
index 7aa4870..e0d6136 100644 (file)
@@ -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: