Mercurial > hg > nginx
comparison src/http/modules/ngx_http_range_filter_module.c @ 4059:cc72e6229416
Unsatisfiable range with start value greater than content length
was not properly skipped. The bug has been introduced in r4057.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 30 Aug 2011 14:25:35 +0000 |
parents | d32a2000b766 |
children | 45de8d258085 |
comparison
equal
deleted
inserted
replaced
4058:d32a2000b766 | 4059:cc72e6229416 |
---|---|
262 | 262 |
263 if (*p++ != '-') { | 263 if (*p++ != '-') { |
264 return NGX_HTTP_RANGE_NOT_SATISFIABLE; | 264 return NGX_HTTP_RANGE_NOT_SATISFIABLE; |
265 } | 265 } |
266 | 266 |
267 if (start >= content_length) { | |
268 goto skip; | |
269 } | |
270 | |
271 while (*p == ' ') { p++; } | 267 while (*p == ' ') { p++; } |
272 | 268 |
273 if (*p == ',' || *p == '\0') { | 269 if (*p == ',' || *p == '\0') { |
274 end = content_length; | 270 end = content_length; |
275 goto found; | 271 goto found; |
297 if (suffix) { | 293 if (suffix) { |
298 start = content_length - end; | 294 start = content_length - end; |
299 end = content_length - 1; | 295 end = content_length - 1; |
300 } | 296 } |
301 | 297 |
302 if (start > end) { | 298 if (start >= content_length || start > end) { |
303 goto skip; | 299 goto skip; |
304 } | 300 } |
305 | 301 |
306 if (end >= content_length) { | 302 if (end >= content_length) { |
307 end = content_length; | 303 end = content_length; |