summaryrefslogtreecommitdiffstatshomepage
path: root/ui-log.c
diff options
context:
space:
mode:
authorJason A. Donenfeld2015-11-24 11:28:00 +0100
committerJason A. Donenfeld2015-11-24 11:31:43 +0100
commit4458abf64172a62b92810c2293450106e6dfc763 (patch)
tree92a3f3587e85c11c77d11769a45d55ddb2fd81a6 /ui-log.c
parentffe09621f2626c692a16b249a52112ba8070aa79 (diff)
downloadcgit-4458abf64172a62b92810c2293450106e6dfc763.tar
cgit-4458abf64172a62b92810c2293450106e6dfc763.tar.gz
cgit-4458abf64172a62b92810c2293450106e6dfc763.zip
filter: avoid integer overflow in authenticate_post
ctx.env.content_length is an unsigned int, coming from the CONTENT_LENGTH environment variable, which is parsed by strtoul. The HTTP/1.1 spec says that "any Content-Length greater than or equal to zero is a valid value." By storing this into an int, we potentially overflow it, resulting in the following bounding check failing, leading to a buffer overflow. Reported-by: Erik Cabetas <Erik@cabetas.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui-log.c')
0 files changed, 0 insertions, 0 deletions
a> 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214