projects
/
u
/
mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8b2a1fd
)
Fix behaviour with bogus trailing attributes.
author
mdw
<mdw>
Thu, 15 May 2003 23:23:24 +0000
(23:23 +0000)
committer
mdw
<mdw>
Thu, 15 May 2003 23:23:24 +0000
(23:23 +0000)
keyutil.c
patch
|
blob
|
blame
|
history
diff --git
a/keyutil.c
b/keyutil.c
index
3f3218e
..
45ae8f4
100644
(file)
--- a/
keyutil.c
+++ b/
keyutil.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: keyutil.c,v 1.1
4 2001/02/23 09:03:27
mdw Exp $
+ * $Id: keyutil.c,v 1.1
5 2003/05/15 23:23:24
mdw Exp $
*
* Simple key manager program
*
*
* Simple key manager program
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: keyutil.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: keyutil.c,v $
+ * Revision 1.15 2003/05/15 23:23:24 mdw
+ * Fix behaviour with bogus trailing attributes.
+ *
* Revision 1.14 2001/02/23 09:03:27 mdw
* Simplify usage message by removing nonexistant options.
*
* Revision 1.14 2001/02/23 09:03:27 mdw
* Simplify usage message by removing nonexistant options.
*
@@
-174,8
+177,11
@@
static void setattr(key_file *f, key *k, char *v[])
int err;
char *p = *v;
size_t eq = strcspn(p, "=");
int err;
char *p = *v;
size_t eq = strcspn(p, "=");
- if (p[eq] == 0)
- moan("invalid assignment: `%s'", p);
+ if (!p[eq]) {
+ moan("invalid assignment: `%s' (ignored)", p);
+ v++;
+ continue;
+ }
p[eq] = 0;
p += eq + 1;
if ((err = key_putattr(f, k, *v, *p ? p : 0)) != 0)
p[eq] = 0;
p += eq + 1;
if ((err = key_putattr(f, k, *v, *p ? p : 0)) != 0)