Skip to content
Browse files

Fixes a very unlikely (but yet feasible) memory issue while removing

header entries.

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6889 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent 611f7b0 commit 6aacdd3c86076478db34098dbcdd8e078403357f @alobbs alobbs committed Oct 7, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 cherokee/header_op.c
View
4 cherokee/header_op.c
@@ -24,6 +24,7 @@
#include "common-internal.h"
#include "header_op.h"
+#include "util.h"
ret_t
cherokee_header_op_new (cherokee_header_op_t **op)
@@ -105,7 +106,8 @@ remove_header (cherokee_buffer_t *buffer,
{
char *p, *s;
- p = strcasestr (buffer->buf, header->buf);
+ p = strncasestrn (buffer->buf, buffer->len,
+ header->buf, header->len);
if (p == NULL)
return ret_not_found;

0 comments on commit 6aacdd3

Please sign in to comment.
Something went wrong with that request. Please try again.