[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: -fix serialization invalid memory access
From: |
gnunet |
Subject: |
[gnunet] branch master updated: -fix serialization invalid memory access |
Date: |
Tue, 07 Jun 2022 18:28:46 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 3f811502e -fix serialization invalid memory access
3f811502e is described below
commit 3f811502ea804c4c3e8031d50dc27db210152337
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Tue Jun 7 18:28:42 2022 +0200
-fix serialization invalid memory access
---
src/gnsrecord/gnsrecord_serialization.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gnsrecord/gnsrecord_serialization.c
b/src/gnsrecord/gnsrecord_serialization.c
index eaa3a9ab2..97c488c2b 100644
--- a/src/gnsrecord/gnsrecord_serialization.c
+++ b/src/gnsrecord/gnsrecord_serialization.c
@@ -229,15 +229,15 @@ GNUNET_GNSRECORD_records_deserialize_get_size (size_t len,
off = 0;
for (off = 0; (off + sizeof(rec) <= len) && (off + sizeof(rec) >= off);)
{
+ GNUNET_memcpy (&rec,
+ &src[off],
+ sizeof(rec));
/*
* If we have found a byte string of zeroes, we have reached
* the padding
*/
if (0 == GNUNET_memcmp (&rec, &rec_zero))
break;
- GNUNET_memcpy (&rec,
- &src[off],
- sizeof(rec));
off += sizeof(rec);
if ((off + ntohs ((uint16_t) rec.data_size) > len) ||
(off + ntohs ((uint16_t) rec.data_size) < off))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: -fix serialization invalid memory access,
gnunet <=