[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r5045 - libmicrohttpd/src/daemon
From: |
gnunet |
Subject: |
[GNUnet-SVN] r5045 - libmicrohttpd/src/daemon |
Date: |
Wed, 13 Jun 2007 17:09:25 -0600 (MDT) |
Author: grothoff
Date: 2007-06-13 17:09:25 -0600 (Wed, 13 Jun 2007)
New Revision: 5045
Modified:
libmicrohttpd/src/daemon/session.c
Log:
fix
Modified: libmicrohttpd/src/daemon/session.c
===================================================================
--- libmicrohttpd/src/daemon/session.c 2007-06-13 23:03:21 UTC (rev 5044)
+++ libmicrohttpd/src/daemon/session.c 2007-06-13 23:09:25 UTC (rev 5045)
@@ -158,6 +158,8 @@
size_t pos;
size_t start;
+ if (session->readLoc == 0)
+ return NULL;
start = 0;
pos = 0;
rbuf = session->read_buffer;
@@ -189,11 +191,11 @@
return NULL;
}
/* found, check if we have proper CRLF */
- rbuf = malloc(pos);
+ rbuf = malloc(pos + 1);
memcpy(rbuf,
session->read_buffer,
- pos-1);
- rbuf[pos-1] = '\0';
+ pos);
+ rbuf[pos] = '\0';
if ( (session->read_buffer[pos] == '\r') &&
(session->read_buffer[pos+1] == '\n') )
pos++; /* skip both r and n */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r5045 - libmicrohttpd/src/daemon,
gnunet <=