Exploit databaseDownload repository ZIP
GH-577f90f09364d1fa4bfdd6cc03c64502
danghvu/nginx-1.4.0
Sources for CVE-2013-2028
11 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files61
danghvu/nginx-1.4.0Revision f5e92466c1f7
- ↑..Parent directory
- nginx.c
- nginx.h
- ngx_array.c
- ngx_array.h
- ngx_buf.c
- ngx_buf.h
- ngx_conf_file.c
- ngx_conf_file.h
- ngx_config.h
- ngx_connection.c
- ngx_connection.h
- ngx_core.h
- ngx_cpuinfo.c
- ngx_crc.h
- ngx_crc32.c
- ngx_crc32.h
- ngx_crypt.c
- ngx_crypt.h
- ngx_cycle.c
- ngx_cycle.h
- ngx_file.c
- ngx_file.h
- ngx_hash.c
- ngx_hash.h
- ngx_inet.c
- ngx_inet.h
- ngx_list.c
- ngx_list.h
- ngx_log.c
- ngx_log.h
- ngx_md5.c
- ngx_md5.h
- ngx_murmurhash.c
- ngx_murmurhash.h
- ngx_open_file_cache.c
- ngx_open_file_cache.h
- ngx_output_chain.c
- ngx_palloc.c
- ngx_palloc.h
- ngx_parse.c
- ngx_parse.h
- ngx_queue.c
- ngx_queue.h
- ngx_radix_tree.c
- ngx_radix_tree.h
- ngx_rbtree.c
- ngx_rbtree.h
- ngx_regex.c
- ngx_regex.h
- ngx_resolver.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/core/ngx_queue.c
C · 1,477 bytes
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
*/
#include <ngx_config.h>
#include <ngx_core.h>
/*
* find the middle queue element if the queue has odd number of elements
* or the first element of the queue's second part otherwise
*/
ngx_queue_t *
ngx_queue_middle(ngx_queue_t *queue)
{
ngx_queue_t *middle, *next;
middle = ngx_queue_head(queue);
if (middle == ngx_queue_last(queue)) {
return middle;
}
next = ngx_queue_head(queue);
for ( ;; ) {
middle = ngx_queue_next(middle);
next = ngx_queue_next(next);
if (next == ngx_queue_last(queue)) {
return middle;
}
next = ngx_queue_next(next);
if (next == ngx_queue_last(queue)) {
return middle;
}
}
}
/* the stable insertion sort */
void
ngx_queue_sort(ngx_queue_t *queue,
ngx_int_t (*cmp)(const ngx_queue_t *, const ngx_queue_t *))
{
ngx_queue_t *q, *prev, *next;
q = ngx_queue_head(queue);
if (q == ngx_queue_last(queue)) {
return;
}
for (q = ngx_queue_next(q); q != ngx_queue_sentinel(queue); q = next) {
prev = ngx_queue_prev(q);
next = ngx_queue_next(q);
ngx_queue_remove(q);
do {
if (cmp(prev, q) <= 0) {
break;
}
prev = ngx_queue_prev(prev);
} while (prev != ngx_queue_sentinel(queue));
ngx_queue_insert_after(prev, q);
}
}