aboutsummaryrefslogtreecommitdiff
path: root/src/pq
diff options
context:
space:
mode:
Diffstat (limited to 'src/pq')
-rw-r--r--src/pq/pq_query_helper.c84
-rw-r--r--src/pq/pq_result_helper.c66
2 files changed, 75 insertions, 75 deletions
diff --git a/src/pq/pq_query_helper.c b/src/pq/pq_query_helper.c
index 1db608edd..2904b63fb 100644
--- a/src/pq/pq_query_helper.c
+++ b/src/pq/pq_query_helper.c
@@ -202,21 +202,21 @@ qconv_denom_pub (void *cls,
}
len = tlen + sizeof (be);
buf = GNUNET_malloc (len);
- memcpy (buf,
- be,
- sizeof (be));
+ GNUNET_memcpy (buf,
+ be,
+ sizeof (be));
switch (denom_pub->cipher)
{
case TALER_DENOMINATION_RSA:
- memcpy (&buf[sizeof (be)],
- tbuf,
- tlen);
+ GNUNET_memcpy (&buf[sizeof (be)],
+ tbuf,
+ tlen);
GNUNET_free (tbuf);
break;
case TALER_DENOMINATION_CS:
- memcpy (&buf[sizeof (be)],
- &denom_pub->details.cs_public_key,
- tlen);
+ GNUNET_memcpy (&buf[sizeof (be)],
+ &denom_pub->details.cs_public_key,
+ tlen);
break;
default:
GNUNET_assert (0);
@@ -298,21 +298,21 @@ qconv_denom_sig (void *cls,
}
len = tlen + sizeof (be);
buf = GNUNET_malloc (len);
- memcpy (buf,
- &be,
- sizeof (be));
+ GNUNET_memcpy (buf,
+ &be,
+ sizeof (be));
switch (denom_sig->cipher)
{
case TALER_DENOMINATION_RSA:
- memcpy (&buf[sizeof (be)],
- tbuf,
- tlen);
+ GNUNET_memcpy (&buf[sizeof (be)],
+ tbuf,
+ tlen);
GNUNET_free (tbuf);
break;
case TALER_DENOMINATION_CS:
- memcpy (&buf[sizeof (be)],
- &denom_sig->details.cs_signature,
- tlen);
+ GNUNET_memcpy (&buf[sizeof (be)],
+ &denom_sig->details.cs_signature,
+ tlen);
break;
default:
GNUNET_assert (0);
@@ -394,21 +394,21 @@ qconv_blinded_denom_sig (void *cls,
}
len = tlen + sizeof (be);
buf = GNUNET_malloc (len);
- memcpy (buf,
- &be,
- sizeof (be));
+ GNUNET_memcpy (buf,
+ &be,
+ sizeof (be));
switch (denom_sig->cipher)
{
case TALER_DENOMINATION_RSA:
- memcpy (&buf[sizeof (be)],
- tbuf,
- tlen);
+ GNUNET_memcpy (&buf[sizeof (be)],
+ tbuf,
+ tlen);
GNUNET_free (tbuf);
break;
case TALER_DENOMINATION_CS:
- memcpy (&buf[sizeof (be)],
- &denom_sig->details.blinded_cs_answer,
- tlen);
+ GNUNET_memcpy (&buf[sizeof (be)],
+ &denom_sig->details.blinded_cs_answer,
+ tlen);
break;
default:
GNUNET_assert (0);
@@ -487,20 +487,20 @@ qconv_blinded_planchet (void *cls,
}
len = tlen + sizeof (be);
buf = GNUNET_malloc (len);
- memcpy (buf,
- &be,
- sizeof (be));
+ GNUNET_memcpy (buf,
+ &be,
+ sizeof (be));
switch (bp->cipher)
{
case TALER_DENOMINATION_RSA:
- memcpy (&buf[sizeof (be)],
- bp->details.rsa_blinded_planchet.blinded_msg,
- tlen);
+ GNUNET_memcpy (&buf[sizeof (be)],
+ bp->details.rsa_blinded_planchet.blinded_msg,
+ tlen);
break;
case TALER_DENOMINATION_CS:
- memcpy (&buf[sizeof (be)],
- &bp->details.cs_blinded_planchet,
- tlen);
+ GNUNET_memcpy (&buf[sizeof (be)],
+ &bp->details.cs_blinded_planchet,
+ tlen);
break;
default:
GNUNET_assert (0);
@@ -578,17 +578,17 @@ qconv_exchange_withdraw_values (void *cls,
}
len = tlen + sizeof (be);
buf = GNUNET_malloc (len);
- memcpy (buf,
- &be,
- sizeof (be));
+ GNUNET_memcpy (buf,
+ &be,
+ sizeof (be));
switch (alg_values->cipher)
{
case TALER_DENOMINATION_RSA:
break;
case TALER_DENOMINATION_CS:
- memcpy (&buf[sizeof (be)],
- &alg_values->details.cs_values,
- tlen);
+ GNUNET_memcpy (&buf[sizeof (be)],
+ &alg_values->details.cs_values,
+ tlen);
break;
default:
GNUNET_assert (0);
diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c
index 139cf1cbf..9441412d4 100644
--- a/src/pq/pq_result_helper.c
+++ b/src/pq/pq_result_helper.c
@@ -113,9 +113,9 @@ extract_amount_nbo_helper (PGresult *result,
}
len = GNUNET_MIN (TALER_CURRENCY_LEN - 1,
strlen (currency));
- memcpy (r_amount_nbo->currency,
- currency,
- len);
+ GNUNET_memcpy (r_amount_nbo->currency,
+ currency,
+ len);
return GNUNET_OK;
}
@@ -420,9 +420,9 @@ extract_denom_pub (void *cls,
GNUNET_break (0);
return GNUNET_SYSERR;
}
- memcpy (be,
- res,
- sizeof (be));
+ GNUNET_memcpy (be,
+ res,
+ sizeof (be));
res += sizeof (be);
len -= sizeof (be);
pk->cipher = ntohl (be[0]);
@@ -445,9 +445,9 @@ extract_denom_pub (void *cls,
GNUNET_break (0);
return GNUNET_SYSERR;
}
- memcpy (&pk->details.cs_public_key,
- res,
- len);
+ GNUNET_memcpy (&pk->details.cs_public_key,
+ res,
+ len);
return GNUNET_OK;
default:
GNUNET_break (0);
@@ -543,9 +543,9 @@ extract_denom_sig (void *cls,
GNUNET_break (0);
return GNUNET_SYSERR;
}
- memcpy (&be,
- res,
- sizeof (be));
+ GNUNET_memcpy (&be,
+ res,
+ sizeof (be));
if (0x00 != ntohl (be[1]))
{
GNUNET_break (0);
@@ -572,9 +572,9 @@ extract_denom_sig (void *cls,
GNUNET_break (0);
return GNUNET_SYSERR;
}
- memcpy (&sig->details.cs_signature,
- res,
- len);
+ GNUNET_memcpy (&sig->details.cs_signature,
+ res,
+ len);
return GNUNET_OK;
default:
GNUNET_break (0);
@@ -670,9 +670,9 @@ extract_blinded_denom_sig (void *cls,
GNUNET_break (0);
return GNUNET_SYSERR;
}
- memcpy (&be,
- res,
- sizeof (be));
+ GNUNET_memcpy (&be,
+ res,
+ sizeof (be));
if (0x01 != ntohl (be[1])) /* magic marker: blinded */
{
GNUNET_break (0);
@@ -699,9 +699,9 @@ extract_blinded_denom_sig (void *cls,
GNUNET_break (0);
return GNUNET_SYSERR;
}
- memcpy (&sig->details.blinded_cs_answer,
- res,
- len);
+ GNUNET_memcpy (&sig->details.blinded_cs_answer,
+ res,
+ len);
return GNUNET_OK;
default:
GNUNET_break (0);
@@ -798,9 +798,9 @@ extract_blinded_planchet (void *cls,
GNUNET_break (0);
return GNUNET_SYSERR;
}
- memcpy (&be,
- res,
- sizeof (be));
+ GNUNET_memcpy (&be,
+ res,
+ sizeof (be));
if (0x0100 != ntohl (be[1])) /* magic marker: blinded */
{
GNUNET_break (0);
@@ -824,9 +824,9 @@ extract_blinded_planchet (void *cls,
GNUNET_break (0);
return GNUNET_SYSERR;
}
- memcpy (&bp->details.cs_blinded_planchet,
- res,
- len);
+ GNUNET_memcpy (&bp->details.cs_blinded_planchet,
+ res,
+ len);
return GNUNET_OK;
default:
GNUNET_break (0);
@@ -923,9 +923,9 @@ extract_exchange_withdraw_values (void *cls,
GNUNET_break (0);
return GNUNET_SYSERR;
}
- memcpy (&be,
- res,
- sizeof (be));
+ GNUNET_memcpy (&be,
+ res,
+ sizeof (be));
if (0x010000 != ntohl (be[1])) /* magic marker: EWV */
{
GNUNET_break (0);
@@ -949,9 +949,9 @@ extract_exchange_withdraw_values (void *cls,
GNUNET_break (0);
return GNUNET_SYSERR;
}
- memcpy (&alg_values->details.cs_values,
- res,
- len);
+ GNUNET_memcpy (&alg_values->details.cs_values,
+ res,
+ len);
return GNUNET_OK;
default:
GNUNET_break (0);