aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2023-07-29 23:12:53 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2023-07-29 23:12:53 +0200
commitb1c63f1b61ebf61aa22043fe988abe1e7883d067 (patch)
tree2ff4951d5a4f0b62b087baeb11fd772238eec3d0
parentb679501b9cd5a8d4fa6ee4e4dcad7eb908249f8c (diff)
parentc9eb2baf69960c9a0724509a56d683a95847dbbd (diff)
downloadgnunet-b1c63f1b61ebf61aa22043fe988abe1e7883d067.tar.gz
gnunet-b1c63f1b61ebf61aa22043fe988abe1e7883d067.zip
Merge remote-tracking branch 'origin/master'
-rw-r--r--src/pq/pq_query_helper.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/pq/pq_query_helper.c b/src/pq/pq_query_helper.c
index 2293c8005..0199f21dd 100644
--- a/src/pq/pq_query_helper.c
+++ b/src/pq/pq_query_helper.c
@@ -797,8 +797,13 @@ qconv_array (
797 } 797 }
798 case array_of_uint64: 798 case array_of_uint64:
799 { 799 {
800 uint64_t tmp;
800 GNUNET_assert (sizeof(uint64_t) == sz); 801 GNUNET_assert (sizeof(uint64_t) == sz);
801 *(uint64_t *) out = GNUNET_htonll (*(uint64_t *) in); 802
803 tmp = GNUNET_htonll (*(uint64_t *) in);
804 GNUNET_memcpy (out,
805 &tmp,
806 sizeof(tmp));
802 in += sz; 807 in += sz;
803 break; 808 break;
804 } 809 }
@@ -815,7 +820,9 @@ qconv_array (
815 else 820 else
816 ptr = ((const void **) data)[i]; 821 ptr = ((const void **) data)[i];
817 822
818 GNUNET_memcpy (out, ptr, sz); 823 GNUNET_memcpy (out,
824 ptr,
825 sz);
819 break; 826 break;
820 } 827 }
821 case array_of_abs_time: 828 case array_of_abs_time:
@@ -874,7 +881,10 @@ qconv_array (
874 if (val > INT64_MAX) 881 if (val > INT64_MAX)
875 val = INT64_MAX; 882 val = INT64_MAX;
876 883
877 *(uint64_t *) out = GNUNET_htonll (val); 884 val = GNUNET_htonll (val);
885 GNUNET_memcpy (out,
886 &val,
887 sizeof(val));
878 888
879 if (meta->continuous) 889 if (meta->continuous)
880 in += sz; 890 in += sz;