gpg: Fix broken write of opaque MPI length header.

* g10/build-packet.c (gpg_mpi_write): Use a char array for the length.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2015-03-16 19:51:06 +01:00
parent 1a9f13bc66
commit 8bc1debfef
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ gpg_mpi_write (iobuf_t out, gcry_mpi_t a)
{
unsigned int nbits;
const void *p;
unsigned int lenhdr[2];
unsigned char lenhdr[2];
p = gcry_mpi_get_opaque (a, &nbits);
lenhdr[0] = nbits >> 8;