[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: check for integer overflow in buffer lib
From: |
gnunet |
Subject: |
[gnunet] branch master updated: check for integer overflow in buffer lib (fixes #6217) |
Date: |
Fri, 24 Apr 2020 10:25:33 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 892bd3c60 check for integer overflow in buffer lib (fixes #6217)
892bd3c60 is described below
commit 892bd3c6013f0a8c44106f16299a34d9a1c99e48
Author: Florian Dold <address@hidden>
AuthorDate: Fri Apr 24 13:50:05 2020 +0530
check for integer overflow in buffer lib (fixes #6217)
---
src/util/buffer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/util/buffer.c b/src/util/buffer.c
index 8efb3e284..dabf630c7 100644
--- a/src/util/buffer.c
+++ b/src/util/buffer.c
@@ -56,6 +56,8 @@ GNUNET_buffer_ensure_remaining (struct GNUNET_Buffer *buf,
{
size_t new_capacity = buf->position + n;
+ /* guard against overflow */
+ GNUNET_assert (new_capacity >= buf->position);
if (new_capacity <= buf->capacity)
return;
/* warn if calculation of expected size was wrong */
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: check for integer overflow in buffer lib (fixes #6217),
gnunet <=