[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnutls-dev
Subject:    [PATCH 2/8] mbuffers: Make _mbuffer_remove_bytes return a
From:       Jonathan Bastien-Filiatrault <joe () x2a ! org>
Date:       2010-09-08 22:34:41
Message-ID: 1283985287-17027-3-git-send-email-joe () x2a ! org
[Download RAW message or body]


Signed-off-by: Jonathan Bastien-Filiatrault <joe@x2a.org>

diff --git a/lib/gnutls_mbuffers.c b/lib/gnutls_mbuffers.c
index 630f53a..7ebcc40 100644
--- a/lib/gnutls_mbuffers.c
+++ b/lib/gnutls_mbuffers.c
@@ -186,7 +186,10 @@ _mbuffer_remove_bytes (mbuffer_head_st *buf, size_t bytes)
   mbuffer_st *bufel, *next;
 
   if (bytes > buf->byte_length)
-    return -1;
+    {
+      gnutls_assert ();
+      return GNUTLS_E_INVALID_REQUEST;
+    }
 
   for (bufel = buf->head; bufel != NULL && left > 0; bufel = next)
     {
-- 
1.7.1


_______________________________________________
Gnutls-devel mailing list
Gnutls-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/gnutls-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic