summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2012-05-31 16:37:56 +0200
committerSimon Josefsson <simon@josefsson.org>2012-05-31 16:37:56 +0200
commit945fe0033fcc5db2140de27d97df363dd5e2fc15 (patch)
treefdd27b7bc296444435a861ee3faf5ccab2465915
parentc9c211a91572481e554bf2d06a2120adccfe16a3 (diff)
downloadlibtasn1-945fe0033fcc5db2140de27d97df363dd5e2fc15.tar.gz
Fix syntax-check warnings.
-rw-r--r--lib/decoding.c4
-rw-r--r--lib/gstr.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/decoding.c b/lib/decoding.c
index 69482a4..e6cdb98 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -163,10 +163,10 @@ asn1_get_tag_der (const unsigned char *der, int der_len,
return ASN1_DER_ERROR;
last = ris;
-
+
ris = (ris * 128) + (der[punt++] & 0x7F);
if (ris < last)
- return ASN1_DER_ERROR;
+ return ASN1_DER_ERROR;
*len = punt;
}
diff --git a/lib/gstr.c b/lib/gstr.c
index 9590b45..4785073 100644
--- a/lib/gstr.c
+++ b/lib/gstr.c
@@ -61,7 +61,7 @@ _asn1_str_cpy (char *dest, size_t dest_tot_size, const char *src)
{
if (dest_tot_size > 0)
{
- strncpy (dest, src, (dest_tot_size) - 1);
+ memcpy (dest, src, dest_tot_size - 1);
dest[dest_tot_size - 1] = 0;
}
}