projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a4e1ec
)
Fix a buffer overflow
author
LRN
<lrn1986@gmail.com>
Sat, 2 Feb 2013 17:25:59 +0000
(17:25 +0000)
committer
LRN
<lrn1986@gmail.com>
Sat, 2 Feb 2013 17:25:59 +0000
(17:25 +0000)
src/util/container_meta_data.c
patch
|
blob
|
history
diff --git
a/src/util/container_meta_data.c
b/src/util/container_meta_data.c
index 9e60a746a3f552db2a7a5792ecb231c67524292d..668c126facbbd85239bde1600589246ec0de456a 100644
(file)
--- a/
src/util/container_meta_data.c
+++ b/
src/util/container_meta_data.c
@@
-897,7
+897,10
@@
GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData
}
if (NULL != *target)
{
- memcpy (*target, dst, clen + sizeof (struct MetaDataHeader));
+ if (GNUNET_YES == comp)
+ memcpy (*target, dst, clen + sizeof (struct MetaDataHeader));
+ else
+ memcpy (*target, dst, left + sizeof (struct MetaDataHeader));
GNUNET_free (dst);
}
else