projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug which decoded elliptic curve key data wrongly.
[u/mdw/catacomb]
/
key-binary.c
diff --git
a/key-binary.c
b/key-binary.c
index
75cfbe7
..
dc8c701
100644
(file)
--- a/
key-binary.c
+++ b/
key-binary.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id
: key-binary.c,v 1.7 2004/04/08 01:36:15 mdw Exp
$
+ * $Id$
*
* Key binary encoding
*
*
* Key binary encoding
*
@@
-112,7
+112,7
@@
int key_decode(const void *p, size_t sz, key_data *k)
ysz = LOAD16(q + 6 + xsz);
if (sz < xsz + ysz + 4) return (-1);
k->u.e.x = mp_loadb(MP_NEW, q + 6, xsz);
ysz = LOAD16(q + 6 + xsz);
if (sz < xsz + ysz + 4) return (-1);
k->u.e.x = mp_loadb(MP_NEW, q + 6, xsz);
- k->u.e.y = mp_loadb(MP_NEW, q +
6
+ xsz, ysz);
+ k->u.e.y = mp_loadb(MP_NEW, q +
8
+ xsz, ysz);
} break;
/* --- Structured key data --- */
} break;
/* --- Structured key data --- */