~ubuntu-branches/ubuntu/lucid/curl/lucid-security

« back to all changes in this revision

Viewing changes to lib/http_chunks.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-12-12 15:04:52 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20051212150452-2ymlra67b2p7kjyy
Tags: 7.15.1-1ubuntu1
Resynchronise with Debian to get URL parser overflow fix from 7.15.1
(CVE-2005-4077).

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21
21
 * KIND, either express or implied.
22
22
 *
23
 
 * $Id: http_chunks.h,v 1.13 2005/03/31 07:02:03 bagder Exp $
 
23
 * $Id: http_chunks.h,v 1.14 2005/07/12 18:15:34 bagder Exp $
24
24
 ***************************************************************************/
25
25
/*
26
26
 * The longest possible hexadecimal number we support in a chunked transfer.
52
52
  /* POSTCR should get a CR and nothing else, then move to POSTLF */
53
53
  CHUNK_POSTCR,
54
54
 
55
 
  /* POSTLF should get a LF and nothing else, then move back to HEX as
56
 
     the CRLF combination marks the end of a chunk */
 
55
  /* POSTLF should get a LF and nothing else, then move back to HEX as the
 
56
     CRLF combination marks the end of a chunk */
57
57
  CHUNK_POSTLF,
58
58
 
59
59
  /* This is mainly used to really mark that we're out of the game.
62
62
     buffer! */
63
63
  CHUNK_STOP,
64
64
 
 
65
  /* At this point optional trailer headers can be found, unless the next line
 
66
     is CRLF */
 
67
  CHUNK_TRAILER,
 
68
 
 
69
  /* A trailer CR has been found - next state is CHUNK_TRAILER_POSTCR.
 
70
     Next char must be a LF */
 
71
  CHUNK_TRAILER_CR,
 
72
 
 
73
  /* A trailer LF must be found now, otherwise CHUNKE_BAD_CHUNK will be
 
74
     signalled If this is an empty trailer CHUNKE_STOP will be signalled.
 
75
     Otherwise the trailer will be broadcasted via Curl_client_write() and the
 
76
     next state will be CHUNK_TRAILER */
 
77
  CHUNK_TRAILER_POSTCR,
 
78
 
65
79
  CHUNK_LAST /* never use */
 
80
 
66
81
} ChunkyState;
67
82
 
68
83
typedef enum {
74
89
  CHUNKE_WRITE_ERROR,
75
90
  CHUNKE_STATE_ERROR,
76
91
  CHUNKE_BAD_ENCODING,
 
92
  CHUNKE_OUT_OF_MEMORY,
77
93
  CHUNKE_LAST
78
94
} CHUNKcode;
79
95