Use len formal parameter of util::parse_content_disposition

pull/31/head
Tatsuhiro Tsujikawa 2012-10-31 01:24:10 +09:00
parent 5dfd1a5af7
commit 49e9f66c16
1 changed files with 2 additions and 2 deletions

View File

@ -895,7 +895,7 @@ int parse_content_disposition(char *dest, size_t destlen,
const char **charsetp, size_t *charsetlenp,
const char *in, size_t len)
{
const char *p = in, *mark_first = NULL, *mark_last = NULL;
const char *p = in, *eop = in + len, *mark_first = NULL, *mark_last = NULL;
int state = CD_BEFORE_DISPOSITION_TYPE;
int in_file_parm = 0;
int flags = 0;
@ -911,7 +911,7 @@ int parse_content_disposition(char *dest, size_t destlen,
*charsetp = NULL;
*charsetlenp = 0;
for(; *p; ++p) {
for(; p != eop; ++p) {
switch(state) {
case CD_BEFORE_DISPOSITION_TYPE:
if(inRFC2616HttpToken(*p)) {