mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
* parse-packet.c (read_protected_v3_mpi): Make sure to stop
reading even for corrupted packets. * keygen.c (generate_user_id): Need to allocate one byte more. Reported by Felix von Leitner.
This commit is contained in:
parent
05277262bc
commit
006c5af165
@ -1,3 +1,10 @@
|
|||||||
|
2007-01-15 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* parse-packet.c (read_protected_v3_mpi): Make sure to stop
|
||||||
|
reading even for corrupted packets.
|
||||||
|
* keygen.c (generate_user_id): Need to allocate one byte more.
|
||||||
|
Reported by Felix von Leitner.
|
||||||
|
|
||||||
2006-12-21 Werner Koch <wk@g10code.com>
|
2006-12-21 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* gpg.c (main): New command --server.
|
* gpg.c (main): New command --server.
|
||||||
|
@ -2130,7 +2130,7 @@ generate_user_id()
|
|||||||
if( !p )
|
if( !p )
|
||||||
return NULL;
|
return NULL;
|
||||||
n = strlen(p);
|
n = strlen(p);
|
||||||
uid = xmalloc_clear( sizeof *uid + n - 1 );
|
uid = xmalloc_clear( sizeof *uid + n );
|
||||||
uid->len = n;
|
uid->len = n;
|
||||||
strcpy(uid->name, p);
|
strcpy(uid->name, p);
|
||||||
uid->ref = 1;
|
uid->ref = 1;
|
||||||
|
@ -1589,11 +1589,11 @@ read_protected_v3_mpi (IOBUF inp, unsigned long *length)
|
|||||||
buf = p = xmalloc (2 + nbytes);
|
buf = p = xmalloc (2 + nbytes);
|
||||||
*p++ = nbits >> 8;
|
*p++ = nbits >> 8;
|
||||||
*p++ = nbits;
|
*p++ = nbits;
|
||||||
for (; nbytes && length; nbytes--, --*length)
|
for (; nbytes && *length; nbytes--, --*length)
|
||||||
*p++ = iobuf_get (inp);
|
*p++ = iobuf_get (inp);
|
||||||
if (nbytes)
|
if (nbytes)
|
||||||
{
|
{
|
||||||
log_error ("packet shorter tham mpi\n");
|
log_error ("packet shorter than mpi\n");
|
||||||
xfree (buf);
|
xfree (buf);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user