aboutsummaryrefslogtreecommitdiffstats
path: root/g10/build-packet.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2002-07-01 16:40:52 +0000
committerDavid Shaw <[email protected]>2002-07-01 16:40:52 +0000
commitb672df87d69704bacb721a25a4728dccd5c357ab (patch)
tree9b5892d960b2dffd7134936e8ee8fd4f7f81e0e8 /g10/build-packet.c
parenttypo fix. (diff)
downloadgnupg-b672df87d69704bacb721a25a4728dccd5c357ab.tar.gz
gnupg-b672df87d69704bacb721a25a4728dccd5c357ab.zip
* packet.h, build-packet.c (build_attribute_subpkt), exec.c (expand_args),
mkdtemp.c (mkdtemp), photoid.c (parse_image_header): Fix some signedness compiler warnings.
Diffstat (limited to 'g10/build-packet.c')
-rw-r--r--g10/build-packet.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/g10/build-packet.c b/g10/build-packet.c
index e24ac3b2a..fd1540528 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -872,8 +872,8 @@ build_sig_subpkt_from_sig( PKT_signature *sig )
void
build_attribute_subpkt(PKT_user_id *uid,byte type,
- const void *buf,int buflen,
- const void *header,int headerlen)
+ const void *buf,u32 buflen,
+ const void *header,u32 headerlen)
{
byte *attrib;
int idx;
@@ -912,7 +912,8 @@ build_attribute_subpkt(PKT_user_id *uid,byte type,
/* Tack on our data at the end */
- memcpy(&attrib[idx],header,headerlen);
+ if(headerlen>0)
+ memcpy(&attrib[idx],header,headerlen);
memcpy(&attrib[idx+headerlen],buf,buflen);
uid->attrib_len+=idx+headerlen+buflen;
}