mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
Fix size_t vs int issues.
This commit is contained in:
parent
9cb6557121
commit
1c684df5b8
@ -1,3 +1,8 @@
|
|||||||
|
2011-06-01 Marcus Brinkmann <mb@g10code.com>
|
||||||
|
|
||||||
|
* cvt-openpgp.c (convert_to_openpgp): Change type of N to unsigned
|
||||||
|
int.
|
||||||
|
|
||||||
2011-04-26 Werner Koch <wk@g10code.com>
|
2011-04-26 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* cvt-openpgp.c (convert_to_openpgp): Use rfc4880 encoded S2K count.
|
* cvt-openpgp.c (convert_to_openpgp): Use rfc4880 encoded S2K count.
|
||||||
|
@ -1062,7 +1062,7 @@ convert_to_openpgp (ctrl_t ctrl, gcry_sexp_t s_key, const char *passphrase,
|
|||||||
void *format_args_buf_ptr[1];
|
void *format_args_buf_ptr[1];
|
||||||
int format_args_buf_int[1];
|
int format_args_buf_int[1];
|
||||||
void *format_args[10+2];
|
void *format_args[10+2];
|
||||||
size_t n;
|
unsigned int n;
|
||||||
gcry_sexp_t tmpkey, tmpsexp = NULL;
|
gcry_sexp_t tmpkey, tmpsexp = NULL;
|
||||||
|
|
||||||
snprintf (countbuf, sizeof countbuf, "%lu", s2k_count);
|
snprintf (countbuf, sizeof countbuf, "%lu", s2k_count);
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2011-06-01 Marcus Brinkmann <mb@g10code.com>
|
||||||
|
|
||||||
|
* util.h: Undef snprintf before redefining it.
|
||||||
|
|
||||||
2011-05-20 Werner Koch <wk@g10code.com>
|
2011-05-20 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* util.h: Remove some error code substitutes.
|
* util.h: Remove some error code substitutes.
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
|
|
||||||
/* Due to a bug in mingw32's snprintf related to the 'l' modifier and
|
/* Due to a bug in mingw32's snprintf related to the 'l' modifier and
|
||||||
for increased portability we use our snprintf on all systems. */
|
for increased portability we use our snprintf on all systems. */
|
||||||
|
#undef snprintf
|
||||||
#define snprintf estream_snprintf
|
#define snprintf estream_snprintf
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2011-06-01 Marcus Brinkmann <mb@g10code.com>
|
||||||
|
|
||||||
|
* parse-packet.c (parse_pubkeyenc): Change type of N to size_t.
|
||||||
|
(parse_key): Likewise.
|
||||||
|
* seskey.c (encode_session_key): Convert nframe to int for
|
||||||
|
debugging.
|
||||||
|
* build-packet.c (gpg_mpi_write): Change type of N to unsigned int.
|
||||||
|
* import.c (transfer_secret_keys): Likewise.
|
||||||
|
|
||||||
2011-04-29 Werner Koch <wk@g10code.com>
|
2011-04-29 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* keydb.c (keydb_get_keyblock, keydb_add_resource): Use gpg_error.
|
* keydb.c (keydb_get_keyblock, keydb_add_resource): Use gpg_error.
|
||||||
|
@ -164,7 +164,7 @@ gpg_mpi_write (iobuf_t out, gcry_mpi_t a)
|
|||||||
|
|
||||||
if (gcry_mpi_get_flag (a, GCRYMPI_FLAG_OPAQUE))
|
if (gcry_mpi_get_flag (a, GCRYMPI_FLAG_OPAQUE))
|
||||||
{
|
{
|
||||||
size_t nbits;
|
unsigned int nbits;
|
||||||
const void *p;
|
const void *p;
|
||||||
|
|
||||||
p = gcry_mpi_get_opaque (a, &nbits);
|
p = gcry_mpi_get_opaque (a, &nbits);
|
||||||
|
@ -1153,7 +1153,7 @@ transfer_secret_keys (ctrl_t ctrl, struct stats_s *stats, kbnode_t sec_keyblock)
|
|||||||
int nskey;
|
int nskey;
|
||||||
membuf_t mbuf;
|
membuf_t mbuf;
|
||||||
int i, j;
|
int i, j;
|
||||||
size_t n;
|
unsigned int n;
|
||||||
void *format_args_buf_ptr[PUBKEY_MAX_NSKEY];
|
void *format_args_buf_ptr[PUBKEY_MAX_NSKEY];
|
||||||
int format_args_buf_int[PUBKEY_MAX_NSKEY];
|
int format_args_buf_int[PUBKEY_MAX_NSKEY];
|
||||||
void *format_args[2*PUBKEY_MAX_NSKEY];
|
void *format_args[2*PUBKEY_MAX_NSKEY];
|
||||||
|
@ -962,7 +962,6 @@ static int
|
|||||||
parse_pubkeyenc (IOBUF inp, int pkttype, unsigned long pktlen,
|
parse_pubkeyenc (IOBUF inp, int pkttype, unsigned long pktlen,
|
||||||
PACKET * packet)
|
PACKET * packet)
|
||||||
{
|
{
|
||||||
unsigned int n;
|
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
int i, ndata;
|
int i, ndata;
|
||||||
PKT_pubkey_enc *k;
|
PKT_pubkey_enc *k;
|
||||||
@ -1009,12 +1008,13 @@ parse_pubkeyenc (IOBUF inp, int pkttype, unsigned long pktlen,
|
|||||||
{
|
{
|
||||||
if (k->pubkey_algo == PUBKEY_ALGO_ECDH && i == 1)
|
if (k->pubkey_algo == PUBKEY_ALGO_ECDH && i == 1)
|
||||||
{
|
{
|
||||||
rc = read_size_body (inp, pktlen, &n, k->data+i);
|
size_t n;
|
||||||
|
rc = read_size_body (inp, pktlen, &n, k->data+i);
|
||||||
pktlen -= n;
|
pktlen -= n;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
n = pktlen;
|
int n = pktlen;
|
||||||
k->data[i] = mpi_read (inp, &n, 0);
|
k->data[i] = mpi_read (inp, &n, 0);
|
||||||
pktlen -= n;
|
pktlen -= n;
|
||||||
if (!k->data[i])
|
if (!k->data[i])
|
||||||
@ -1890,7 +1890,6 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
|
|||||||
{
|
{
|
||||||
gpg_error_t err = 0;
|
gpg_error_t err = 0;
|
||||||
int i, version, algorithm;
|
int i, version, algorithm;
|
||||||
unsigned n;
|
|
||||||
unsigned long timestamp, expiredate, max_expiredate;
|
unsigned long timestamp, expiredate, max_expiredate;
|
||||||
int npkey, nskey;
|
int npkey, nskey;
|
||||||
int is_v4 = 0;
|
int is_v4 = 0;
|
||||||
@ -2003,12 +2002,13 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
|
|||||||
if ((algorithm == PUBKEY_ALGO_ECDSA
|
if ((algorithm == PUBKEY_ALGO_ECDSA
|
||||||
|| algorithm == PUBKEY_ALGO_ECDH) && (i==0 || i == 2))
|
|| algorithm == PUBKEY_ALGO_ECDH) && (i==0 || i == 2))
|
||||||
{
|
{
|
||||||
err = read_size_body (inp, pktlen, &n, pk->pkey+i);
|
size_t n;
|
||||||
|
err = read_size_body (inp, pktlen, &n, pk->pkey+i);
|
||||||
pktlen -= n;
|
pktlen -= n;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
n = pktlen;
|
unsigned int n = pktlen;
|
||||||
pk->pkey[i] = mpi_read (inp, &n, 0);
|
pk->pkey[i] = mpi_read (inp, &n, 0);
|
||||||
pktlen -= n;
|
pktlen -= n;
|
||||||
if (!pk->pkey[i])
|
if (!pk->pkey[i])
|
||||||
@ -2255,7 +2255,7 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
n = pktlen;
|
unsigned int n = pktlen;
|
||||||
pk->pkey[i] = mpi_read (inp, &n, 0);
|
pk->pkey[i] = mpi_read (inp, &n, 0);
|
||||||
pktlen -= n;
|
pktlen -= n;
|
||||||
if (list_mode)
|
if (list_mode)
|
||||||
|
@ -120,7 +120,7 @@ encode_session_key (int openpgp_pk_algo, DEK *dek, unsigned int nbits)
|
|||||||
if (DBG_CIPHER)
|
if (DBG_CIPHER)
|
||||||
log_debug ("encode_session_key: "
|
log_debug ("encode_session_key: "
|
||||||
"[%d] %02x %02x %02x ... %02x %02x %02x\n",
|
"[%d] %02x %02x %02x ... %02x %02x %02x\n",
|
||||||
nframe, frame[0], frame[1], frame[2],
|
(int) nframe, frame[0], frame[1], frame[2],
|
||||||
frame[nframe-3], frame[nframe-2], frame[nframe-1]);
|
frame[nframe-3], frame[nframe-2], frame[nframe-1]);
|
||||||
|
|
||||||
if (gcry_mpi_scan (&a, GCRYMPI_FMT_USG, frame, nframe, &nframe))
|
if (gcry_mpi_scan (&a, GCRYMPI_FMT_USG, frame, nframe, &nframe))
|
||||||
|
@ -193,6 +193,6 @@ mountinfo_dump_all (void)
|
|||||||
for (idx=0, m = mounttable; idx < mounttable_size; idx++, m++)
|
for (idx=0, m = mounttable; idx < mounttable_size; idx++, m++)
|
||||||
if (m->in_use)
|
if (m->in_use)
|
||||||
log_info ("mtab[%d] %s on %s type %d rid %u%s\n",
|
log_info ("mtab[%d] %s on %s type %d rid %u%s\n",
|
||||||
idx, m->container, m->mountpoint, m->conttype, m->rid,
|
(int)idx, m->container, m->mountpoint, m->conttype, m->rid,
|
||||||
m->flags.remove?" [remove]":"");
|
m->flags.remove?" [remove]":"");
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2011-06-01 Marcus Brinkmann <mb@g10code.com>
|
||||||
|
|
||||||
|
* certreqgen.c (proc_parameters): Initialize RC.
|
||||||
|
|
||||||
2011-04-25 Werner Koch <wk@g10code.com>
|
2011-04-25 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* certlist.c (gpgsm_add_to_certlist): Mark classify_user_id for
|
* certlist.c (gpgsm_add_to_certlist): Mark classify_user_id for
|
||||||
|
@ -409,7 +409,7 @@ proc_parameters (ctrl_t ctrl, struct para_data_s *para,
|
|||||||
unsigned int nbits;
|
unsigned int nbits;
|
||||||
char numbuf[20];
|
char numbuf[20];
|
||||||
unsigned char keyparms[100];
|
unsigned char keyparms[100];
|
||||||
int rc;
|
int rc = 0;
|
||||||
ksba_sexp_t public;
|
ksba_sexp_t public;
|
||||||
ksba_sexp_t sigkey = NULL;
|
ksba_sexp_t sigkey = NULL;
|
||||||
int seq;
|
int seq;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user