Skip to content

Commit

Permalink
Fixes a very unlikely (but yet feasible) memory issue while removing
Browse files Browse the repository at this point in the history
header entries.

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6889 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information
alobbs committed Oct 7, 2011
1 parent 611f7b0 commit 6aacdd3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cherokee/header_op.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 6aacdd3

Please sign in to comment.