From b672df87d69704bacb721a25a4728dccd5c357ab Mon Sep 17 00:00:00 2001 From: David Shaw Date: Mon, 1 Jul 2002 16:40:52 +0000 Subject: * 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. --- g10/build-packet.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'g10/build-packet.c') 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; } -- cgit v1.2.3