idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
4,000
static int get_crl_score(X509_STORE_CTX *ctx, X509 **pissuer, unsigned int *preasons, X509_CRL *crl, X509 *x) { int crl_score = 0; unsigned int tmp_reasons = *preasons, crl_reasons; /* First see if we can reject CRL straight away */ /* Invalid IDP cannot be processed */ i...
null
0
static int get_crl_score(X509_STORE_CTX *ctx, X509 **pissuer, unsigned int *preasons, X509_CRL *crl, X509 *x) { int crl_score = 0; unsigned int tmp_reasons = *preasons, crl_reasons; /* First see if we can reject CRL straight away */ /* Invalid IDP cannot be processed */ i...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
4,001
static int get_crl_sk(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl, X509 **pissuer, int *pscore, unsigned int *preasons, STACK_OF(X509_CRL) *crls) { int i, crl_score, best_score = *pscore; unsigned int reasons, best_reasons = 0; X509 *x = ctx->current_ce...
null
0
static int get_crl_sk(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl, X509 **pissuer, int *pscore, unsigned int *preasons, STACK_OF(X509_CRL) *crls) { int i, crl_score, best_score = *pscore; unsigned int reasons, best_reasons = 0; X509 *x = ctx->current_ce...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
4,002
static void get_delta_sk(X509_STORE_CTX *ctx, X509_CRL **dcrl, int *pscore, X509_CRL *base, STACK_OF(X509_CRL) *crls) { X509_CRL *delta; int i; if (!(ctx->param->flags & X509_V_FLAG_USE_DELTAS)) return; if (!((ctx->current_cert->ex_flags | base->flags) & EXFLAG_FRESHEST)...
null
0
static void get_delta_sk(X509_STORE_CTX *ctx, X509_CRL **dcrl, int *pscore, X509_CRL *base, STACK_OF(X509_CRL) *crls) { X509_CRL *delta; int i; if (!(ctx->param->flags & X509_V_FLAG_USE_DELTAS)) return; if (!((ctx->current_cert->ex_flags | base->flags) & EXFLAG_FRESHEST)...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
4,003
static int get_issuer_sk(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) { *issuer = find_issuer(ctx, ctx->other_ctx, x); if (*issuer) { CRYPTO_add(&(*issuer)->references, 1, CRYPTO_LOCK_X509); return 1; } else return 0; }
null
0
static int get_issuer_sk(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) { *issuer = find_issuer(ctx, ctx->other_ctx, x); if (*issuer) { CRYPTO_add(&(*issuer)->references, 1, CRYPTO_LOCK_X509); return 1; } else return 0; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
4,004
static int idp_check_dp(DIST_POINT_NAME *a, DIST_POINT_NAME *b) { X509_NAME *nm = NULL; GENERAL_NAMES *gens = NULL; GENERAL_NAME *gena, *genb; int i, j; if (!a || !b) return 1; if (a->type == 1) { if (!a->dpname) return 0; /* Case 1: two X509_NAME */ i...
null
0
static int idp_check_dp(DIST_POINT_NAME *a, DIST_POINT_NAME *b) { X509_NAME *nm = NULL; GENERAL_NAMES *gens = NULL; GENERAL_NAME *gena, *genb; int i, j; if (!a || !b) return 1; if (a->type == 1) { if (!a->dpname) return 0; /* Case 1: two X509_NAME */ i...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
4,005
static int internal_verify(X509_STORE_CTX *ctx) { int ok = 0, n; X509 *xs, *xi; EVP_PKEY *pkey = NULL; int (*cb) (int xok, X509_STORE_CTX *xctx); cb = ctx->verify_cb; n = sk_X509_num(ctx->chain); ctx->error_depth = n - 1; n--; xi = sk_X509_value(ctx->chain, n); if (ctx->check_...
null
0
static int internal_verify(X509_STORE_CTX *ctx) { int ok = 0, n; X509 *xs, *xi; EVP_PKEY *pkey = NULL; int (*cb) (int xok, X509_STORE_CTX *xctx); cb = ctx->verify_cb; n = sk_X509_num(ctx->chain); ctx->error_depth = n - 1; n--; xi = sk_X509_value(ctx->chain, n); if (ctx->check_...
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
4,006
static int null_callback(int ok, X509_STORE_CTX *e) { return ok; }
null
0
static int null_callback(int ok, X509_STORE_CTX *e) { return ok; }
@@ -328,8 +328,8 @@ int X509_verify_cert(X509_STORE_CTX *ctx) xtmp = sk_X509_pop(ctx->chain); X509_free(xtmp); num--; - ctx->last_untrusted--; } + ctx->last_untrusted = sk_X509_num(c...
CWE-254
null
null
4,007
int ssl3_accept(SSL *s) { BUF_MEM *buf; unsigned long alg_k, Time = (unsigned long)time(NULL); void (*cb) (const SSL *ssl, int type, int val) = NULL; int ret = -1; int new_state, state, skip = 0; RAND_add(&Time, sizeof(Time), 0); ERR_clear_error(); clear_sys_error(); if (s->info_ca...
DoS
0
int ssl3_accept(SSL *s) { BUF_MEM *buf; unsigned long alg_k, Time = (unsigned long)time(NULL); void (*cb) (const SSL *ssl, int type, int val) = NULL; int ret = -1; int new_state, state, skip = 0; RAND_add(&Time, sizeof(Time), 0); ERR_clear_error(); clear_sys_error(); if (s->info_ca...
@@ -2251,10 +2251,17 @@ int ssl3_get_client_key_exchange(SSL *s) if (alg_k & (SSL_kEDH | SSL_kDHr | SSL_kDHd)) { int idx = -1; EVP_PKEY *skey = NULL; - if (n) + if (n > 1) { n2s(p, i); - else + } else { + if (alg_k & SSL_kDHE) { + ...
CWE-20
null
null
4,008
int ssl3_get_client_certificate(SSL *s) { int i, ok, al, ret = -1; X509 *x = NULL; unsigned long l, nc, llen, n; const unsigned char *p, *q; unsigned char *d; STACK_OF(X509) *sk = NULL; n = s->method->ssl_get_message(s, SSL3_ST_SR_CERT_A, ...
DoS
0
int ssl3_get_client_certificate(SSL *s) { int i, ok, al, ret = -1; X509 *x = NULL; unsigned long l, nc, llen, n; const unsigned char *p, *q; unsigned char *d; STACK_OF(X509) *sk = NULL; n = s->method->ssl_get_message(s, SSL3_ST_SR_CERT_A, ...
@@ -2251,10 +2251,17 @@ int ssl3_get_client_key_exchange(SSL *s) if (alg_k & (SSL_kEDH | SSL_kDHr | SSL_kDHd)) { int idx = -1; EVP_PKEY *skey = NULL; - if (n) + if (n > 1) { n2s(p, i); - else + } else { + if (alg_k & SSL_kDHE) { + ...
CWE-20
null
null
4,009
int ssl3_get_client_hello(SSL *s) { int i, j, ok, al = SSL_AD_INTERNAL_ERROR, ret = -1; unsigned int cookie_len; long n; unsigned long id; unsigned char *p, *d; SSL_CIPHER *c; #ifndef OPENSSL_NO_COMP unsigned char *q; SSL_COMP *comp = NULL; #endif STACK_OF(SSL_CIPHER) *ciphers = NULL...
DoS
0
int ssl3_get_client_hello(SSL *s) { int i, j, ok, al = SSL_AD_INTERNAL_ERROR, ret = -1; unsigned int cookie_len; long n; unsigned long id; unsigned char *p, *d; SSL_CIPHER *c; #ifndef OPENSSL_NO_COMP unsigned char *q; SSL_COMP *comp = NULL; #endif STACK_OF(SSL_CIPHER) *ciphers = NULL...
@@ -2251,10 +2251,17 @@ int ssl3_get_client_key_exchange(SSL *s) if (alg_k & (SSL_kEDH | SSL_kDHr | SSL_kDHd)) { int idx = -1; EVP_PKEY *skey = NULL; - if (n) + if (n > 1) { n2s(p, i); - else + } else { + if (alg_k & SSL_kDHE) { + ...
CWE-20
null
null
4,010
AddDef(String *buff, char *title, char *value) { #ifdef PATHETICCPP if (need_real_defines) { addstring(buff, "\n#define "); addstring(buff, title); if (value && (value[0] != '\0')) { addstring(buff, " "); addstring(buff, value); } return; } #endif if (buff->used) { if (oper == OPSYMBOLS) ...
Exec Code
0
AddDef(String *buff, char *title, char *value) { #ifdef PATHETICCPP if (need_real_defines) { addstring(buff, "\n#define "); addstring(buff, title); if (value && (value[0] != '\0')) { addstring(buff, " "); addstring(buff, value); } return; } #endif if (buff->used) { if (oper == OPSYMBOLS) ...
@@ -142,6 +142,8 @@ static Entries newDB; static void fatal(char *, ...); static void addstring ( String *arg, const char *s ); +static void addescapedstring ( String *arg, const char *s ); +static void addtokstring ( String *arg, const char *s ); static void FormatEntries ( Buffer *buffer, Entries *entries ); st...
CWE-20
null
null
4,011
AppendEntryToBuffer(Buffer *buffer, Entry *entry) { AppendToBuffer(buffer, entry->tag, strlen(entry->tag)); AppendToBuffer(buffer, ":\t", 2); AppendToBuffer(buffer, entry->value, strlen(entry->value)); AppendToBuffer(buffer, "\n", 1); }
Exec Code
0
AppendEntryToBuffer(Buffer *buffer, Entry *entry) { AppendToBuffer(buffer, entry->tag, strlen(entry->tag)); AppendToBuffer(buffer, ":\t", 2); AppendToBuffer(buffer, entry->value, strlen(entry->value)); AppendToBuffer(buffer, "\n", 1); }
@@ -142,6 +142,8 @@ static Entries newDB; static void fatal(char *, ...); static void addstring ( String *arg, const char *s ); +static void addescapedstring ( String *arg, const char *s ); +static void addtokstring ( String *arg, const char *s ); static void FormatEntries ( Buffer *buffer, Entries *entries ); st...
CWE-20
null
null
4,012
AppendToBuffer(Buffer *b, char *str, int len) { while (b->used + len > b->room) { b->buff = (char *)realloc(b->buff, 2*b->room*(sizeof(char))); b->room *= 2; } strncpy(b->buff + b->used, str, len); b->used += len; }
Exec Code
0
AppendToBuffer(Buffer *b, char *str, int len) { while (b->used + len > b->room) { b->buff = (char *)realloc(b->buff, 2*b->room*(sizeof(char))); b->room *= 2; } strncpy(b->buff + b->used, str, len); b->used += len; }
@@ -142,6 +142,8 @@ static Entries newDB; static void fatal(char *, ...); static void addstring ( String *arg, const char *s ); +static void addescapedstring ( String *arg, const char *s ); +static void addtokstring ( String *arg, const char *s ); static void FormatEntries ( Buffer *buffer, Entries *entries ); st...
CWE-20
null
null
4,013
FindFirst(char *string, char dest, int *lines) { if (lines) *lines = 0; for (;;) { if (*string == '\0') return NULL; if (*string == '\\') { if (*++string == '\0') return NULL; } else if (*string == dest) return string; if (*string == '\n' && lines) (*lines)++; string++; } }
Exec Code
0
FindFirst(char *string, char dest, int *lines) { if (lines) *lines = 0; for (;;) { if (*string == '\0') return NULL; if (*string == '\\') { if (*++string == '\0') return NULL; } else if (*string == dest) return string; if (*string == '\n' && lines) (*lines)++; string++; } }
@@ -142,6 +142,8 @@ static Entries newDB; static void fatal(char *, ...); static void addstring ( String *arg, const char *s ); +static void addescapedstring ( String *arg, const char *s ); +static void addtokstring ( String *arg, const char *s ); static void FormatEntries ( Buffer *buffer, Entries *entries ); st...
CWE-20
null
null
4,014
FreeEntries(Entries *e) { register int i; for (i = 0; i < e->used; i++) { if (e->entry[i].usable) { free(e->entry[i].tag); free(e->entry[i].value); } } free((char *)e->entry); }
Exec Code
0
FreeEntries(Entries *e) { register int i; for (i = 0; i < e->used; i++) { if (e->entry[i].usable) { free(e->entry[i].tag); free(e->entry[i].value); } } free((char *)e->entry); }
@@ -142,6 +142,8 @@ static Entries newDB; static void fatal(char *, ...); static void addstring ( String *arg, const char *s ); +static void addescapedstring ( String *arg, const char *s ); +static void addtokstring ( String *arg, const char *s ); static void FormatEntries ( Buffer *buffer, Entries *entries ); st...
CWE-20
null
null
4,015
GetEntries(Entries *entries, Buffer *buff, int bequiet) { register char *line, *colon, *temp, *str; Entry entry; register int length; int lineno = 0; int lines_skipped; str = buff->buff; if (!str) return; for ( ; str < buff->buff + buff->used; str = line + 1, lineno += lines_skipped)...
Exec Code
0
GetEntries(Entries *entries, Buffer *buff, int bequiet) { register char *line, *colon, *temp, *str; Entry entry; register int length; int lineno = 0; int lines_skipped; str = buff->buff; if (!str) return; for ( ; str < buff->buff + buff->used; str = line + 1, lineno += lines_skipped)...
@@ -142,6 +142,8 @@ static Entries newDB; static void fatal(char *, ...); static void addstring ( String *arg, const char *s ); +static void addescapedstring ( String *arg, const char *s ); +static void addtokstring ( String *arg, const char *s ); static void FormatEntries ( Buffer *buffer, Entries *entries ); st...
CWE-20
null
null
4,016
GetEntriesString(Entries *entries, char *str) { Buffer buff; if (str && *str) { buff.buff = str; buff.used = strlen(str); GetEntries(entries, &buff, 1); } }
Exec Code
0
GetEntriesString(Entries *entries, char *str) { Buffer buff; if (str && *str) { buff.buff = str; buff.used = strlen(str); GetEntries(entries, &buff, 1); } }
@@ -142,6 +142,8 @@ static Entries newDB; static void fatal(char *, ...); static void addstring ( String *arg, const char *s ); +static void addescapedstring ( String *arg, const char *s ); +static void addtokstring ( String *arg, const char *s ); static void FormatEntries ( Buffer *buffer, Entries *entries ); st...
CWE-20
null
null
4,017
InitBuffer(Buffer *b) { b->room = INIT_BUFFER_SIZE; b->used = 0; b->buff = (char *)malloc(INIT_BUFFER_SIZE*sizeof(char)); }
Exec Code
0
InitBuffer(Buffer *b) { b->room = INIT_BUFFER_SIZE; b->used = 0; b->buff = (char *)malloc(INIT_BUFFER_SIZE*sizeof(char)); }
@@ -142,6 +142,8 @@ static Entries newDB; static void fatal(char *, ...); static void addstring ( String *arg, const char *s ); +static void addescapedstring ( String *arg, const char *s ); +static void addtokstring ( String *arg, const char *s ); static void FormatEntries ( Buffer *buffer, Entries *entries ); st...
CWE-20
null
null
4,018
InitEntries(Entries *e) { e->room = INIT_ENTRY_SIZE; e->used = 0; e->entry = (Entry *)malloc(INIT_ENTRY_SIZE*sizeof(Entry)); }
Exec Code
0
InitEntries(Entries *e) { e->room = INIT_ENTRY_SIZE; e->used = 0; e->entry = (Entry *)malloc(INIT_ENTRY_SIZE*sizeof(Entry)); }
@@ -142,6 +142,8 @@ static Entries newDB; static void fatal(char *, ...); static void addstring ( String *arg, const char *s ); +static void addescapedstring ( String *arg, const char *s ); +static void addtokstring ( String *arg, const char *s ); static void FormatEntries ( Buffer *buffer, Entries *entries ); st...
CWE-20
null
null
4,019
ReadFile(Buffer *buffer, FILE *input) { char buf[BUFSIZ + 1]; register int bytes; buffer->used = 0; while (!feof(input) && (bytes = fread(buf, 1, BUFSIZ, input)) > 0) { #ifdef WIN32 char *p; buf[bytes] = '\0'; for (p = buf; p = strchr(p, '\r'); ) { if (p[-1] == '\\' && p[1] == '\n') { bytes...
Exec Code
0
ReadFile(Buffer *buffer, FILE *input) { char buf[BUFSIZ + 1]; register int bytes; buffer->used = 0; while (!feof(input) && (bytes = fread(buf, 1, BUFSIZ, input)) > 0) { #ifdef WIN32 char *p; buf[bytes] = '\0'; for (p = buf; p = strchr(p, '\r'); ) { if (p[-1] == '\\' && p[1] == '\n') { bytes...
@@ -142,6 +142,8 @@ static Entries newDB; static void fatal(char *, ...); static void addstring ( String *arg, const char *s ); +static void addescapedstring ( String *arg, const char *s ); +static void addtokstring ( String *arg, const char *s ); static void FormatEntries ( Buffer *buffer, Entries *entries ); st...
CWE-20
null
null
4,020
asprintf(char ** ret, const char *format, ...) { char buf[256]; int len; va_list ap; va_start(ap, format); len = vsnprintf(buf, sizeof(buf), format, ap); va_end(ap); if (len < 0) return -1; if (len < sizeof(buf)) { *ret = strdup(buf); } else { *ret = malloc(len + 1)...
Exec Code
0
asprintf(char ** ret, const char *format, ...) { char buf[256]; int len; va_list ap; va_start(ap, format); len = vsnprintf(buf, sizeof(buf), format, ap); va_end(ap); if (len < 0) return -1; if (len < sizeof(buf)) { *ret = strdup(buf); } else { *ret = malloc(len + 1)...
@@ -142,6 +142,8 @@ static Entries newDB; static void fatal(char *, ...); static void addstring ( String *arg, const char *s ); +static void addescapedstring ( String *arg, const char *s ); +static void addtokstring ( String *arg, const char *s ); static void FormatEntries ( Buffer *buffer, Entries *entries ); st...
CWE-20
null
null
4,021
PHP_FUNCTION(curl_version) { curl_version_info_data *d; zend_long uversion = CURLVERSION_NOW; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &uversion) == FAILURE) { return; } d = curl_version_info(uversion); if (d == NULL) { RETURN_FALSE; } array_init(return_value); CAAL("version_number", d->version...
DoS
0
PHP_FUNCTION(curl_version) { curl_version_info_data *d; zend_long uversion = CURLVERSION_NOW; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &uversion) == FAILURE) { return; } d = curl_version_info(uversion); if (d == NULL) { RETURN_FALSE; } array_init(return_value); CAAL("version_number", d->version...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,022
PHP_FUNCTION(curl_init) { php_curl *ch; CURL *cp; char *url = NULL; size_t url_len = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &url, &url_len) == FAILURE) { return; } cp = curl_easy_init(); if (!cp) { php_error_docref(NULL, E_WARNING, "Could not initialize a new cURL handle"); RETURN_FA...
DoS
0
PHP_FUNCTION(curl_init) { php_curl *ch; CURL *cp; char *url = NULL; size_t url_len = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &url, &url_len) == FAILURE) { return; } cp = curl_easy_init(); if (!cp) { php_error_docref(NULL, E_WARNING, "Could not initialize a new cURL handle"); RETURN_FA...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,023
PHP_FUNCTION(curl_copy_handle) { CURL *cp; zval *zid; php_curl *ch, *dupch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zid) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); cp = curl_easy_duphandle(ch->cp); if (!cp) { php_error_docref(NULL, E_WARNING, "...
DoS
0
PHP_FUNCTION(curl_copy_handle) { CURL *cp; zval *zid; php_curl *ch, *dupch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zid) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); cp = curl_easy_duphandle(ch->cp); if (!cp) { php_error_docref(NULL, E_WARNING, "...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,024
PHP_FUNCTION(curl_setopt) { zval *zid, *zvalue; zend_long options; php_curl *ch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlz", &zid, &options, &zvalue) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); if (options <= 0 && options != CURLOPT_SAFE_...
DoS
0
PHP_FUNCTION(curl_setopt) { zval *zid, *zvalue; zend_long options; php_curl *ch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlz", &zid, &options, &zvalue) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); if (options <= 0 && options != CURLOPT_SAFE_...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,025
PHP_FUNCTION(curl_getinfo) { zval *zid; php_curl *ch; zend_long option = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &zid, &option) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); if (ZEND_NUM_ARGS() < 2) { char *s_code; zend_long l_code; double ...
DoS
0
PHP_FUNCTION(curl_getinfo) { zval *zid; php_curl *ch; zend_long option = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|l", &zid, &option) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); if (ZEND_NUM_ARGS() < 2) { char *s_code; zend_long l_code; double ...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,026
PHP_FUNCTION(curl_error) { zval *zid; php_curl *ch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zid) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); ch->err.str[CURL_ERROR_SIZE] = 0; RETURN_STRING(ch->err.str); }
DoS
0
PHP_FUNCTION(curl_error) { zval *zid; php_curl *ch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zid) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); ch->err.str[CURL_ERROR_SIZE] = 0; RETURN_STRING(ch->err.str); }
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,027
PHP_FUNCTION(curl_errno) { zval *zid; php_curl *ch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zid) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); RETURN_LONG(ch->err.no); }
DoS
0
PHP_FUNCTION(curl_errno) { zval *zid; php_curl *ch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zid) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); RETURN_LONG(ch->err.no); }
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,028
PHP_FUNCTION(curl_strerror) { zend_long code; const char *str; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &code) == FAILURE) { return; } str = curl_easy_strerror(code); if (str) { RETURN_STRING(str); } else { RETURN_NULL(); } }
DoS
0
PHP_FUNCTION(curl_strerror) { zend_long code; const char *str; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &code) == FAILURE) { return; } str = curl_easy_strerror(code); if (str) { RETURN_STRING(str); } else { RETURN_NULL(); } }
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,029
PHP_FUNCTION(curl_escape) { char *str = NULL, *res = NULL; size_t str_len = 0; zval *zid; php_curl *ch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &zid, &str, &str_len) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); if ((res = curl_ea...
DoS
0
PHP_FUNCTION(curl_escape) { char *str = NULL, *res = NULL; size_t str_len = 0; zval *zid; php_curl *ch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &zid, &str, &str_len) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); if ((res = curl_ea...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,030
PHP_FUNCTION(curl_unescape) { char *str = NULL, *out = NULL; int str_len = 0, out_len; zval *zid; php_curl *ch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &zid, &str, &str_len) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); if ((out =...
DoS
0
PHP_FUNCTION(curl_unescape) { char *str = NULL, *out = NULL; int str_len = 0, out_len; zval *zid; php_curl *ch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &zid, &str, &str_len) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); if ((out =...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,031
PHP_FUNCTION(curl_pause) { zend_long bitmask; zval *zid; php_curl *ch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &zid, &bitmask) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); RETURN_LONG(curl_easy_pause(ch->cp, bitmask)); }
DoS
0
PHP_FUNCTION(curl_pause) { zend_long bitmask; zval *zid; php_curl *ch; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &zid, &bitmask) == FAILURE) { return; } ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl); RETURN_LONG(curl_easy_pause(ch->cp, bitmask)); }
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,032
PHP_MINFO_FUNCTION(curl) { curl_version_info_data *d; char **p; char str[1024]; size_t n = 0; d = curl_version_info(CURLVERSION_NOW); php_info_print_table_start(); php_info_print_table_row(2, "cURL support", "enabled"); php_info_print_table_row(2, "cURL Information", d->version); sprintf(str, "%d", d->age)...
DoS
0
PHP_MINFO_FUNCTION(curl) { curl_version_info_data *d; char **p; char str[1024]; size_t n = 0; d = curl_version_info(CURLVERSION_NOW); php_info_print_table_start(); php_info_print_table_row(2, "cURL support", "enabled"); php_info_print_table_row(2, "cURL Information", d->version); sprintf(str, "%d", d->age)...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,033
PHP_MINIT_FUNCTION(curl) { le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, "curl", module_number); le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl_multi", module_number); le_curl_share_handle = zend_register_list_destructors_ex(_php_curl_share_close, NUL...
DoS
0
PHP_MINIT_FUNCTION(curl) { le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, "curl", module_number); le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl_multi", module_number); le_curl_share_handle = zend_register_list_destructors_ex(_php_curl_share_close, NUL...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,034
PHP_MSHUTDOWN_FUNCTION(curl) { curl_global_cleanup(); #ifdef PHP_CURL_NEED_OPENSSL_TSL if (php_curl_openssl_tsl) { int i, c = CRYPTO_num_locks(); CRYPTO_set_id_callback(NULL); CRYPTO_set_locking_callback(NULL); for (i = 0; i < c; ++i) { tsrm_mutex_free(php_curl_openssl_tsl[i]); } free(php_curl_opens...
DoS
0
PHP_MSHUTDOWN_FUNCTION(curl) { curl_global_cleanup(); #ifdef PHP_CURL_NEED_OPENSSL_TSL if (php_curl_openssl_tsl) { int i, c = CRYPTO_num_locks(); CRYPTO_set_id_callback(NULL); CRYPTO_set_locking_callback(NULL); for (i = 0; i < c; ++i) { tsrm_mutex_free(php_curl_openssl_tsl[i]); } free(php_curl_opens...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,035
void _php_curl_cleanup_handle(php_curl *ch) { smart_str_free(&ch->handlers->write->buf); if (ch->header.str) { zend_string_release(ch->header.str); ch->header.str = NULL; } memset(ch->err.str, 0, CURL_ERROR_SIZE + 1); ch->err.no = 0; }
DoS
0
void _php_curl_cleanup_handle(php_curl *ch) { smart_str_free(&ch->handlers->write->buf); if (ch->header.str) { zend_string_release(ch->header.str); ch->header.str = NULL; } memset(ch->err.str, 0, CURL_ERROR_SIZE + 1); ch->err.no = 0; }
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,036
static void _php_curl_close(zend_resource *rsrc) { php_curl *ch = (php_curl *) rsrc->ptr; _php_curl_close_ex(ch); }
DoS
0
static void _php_curl_close(zend_resource *rsrc) { php_curl *ch = (php_curl *) rsrc->ptr; _php_curl_close_ex(ch); }
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,037
static void _php_curl_close_ex(php_curl *ch) { #if PHP_CURL_DEBUG fprintf(stderr, "DTOR CALLED, ch = %x\n", ch); #endif _php_curl_verify_handlers(ch, 0); /* * Libcurl is doing connection caching. When easy handle is cleaned up, * if the handle was previously used by the curl_multi_api, the connection * remai...
DoS
0
static void _php_curl_close_ex(php_curl *ch) { #if PHP_CURL_DEBUG fprintf(stderr, "DTOR CALLED, ch = %x\n", ch); #endif _php_curl_verify_handlers(ch, 0); /* * Libcurl is doing connection caching. When easy handle is cleaned up, * if the handle was previously used by the curl_multi_api, the connection * remai...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,038
static void _php_curl_reset_handlers(php_curl *ch) { if (!Z_ISUNDEF(ch->handlers->write->stream)) { zval_ptr_dtor(&ch->handlers->write->stream); ZVAL_UNDEF(&ch->handlers->write->stream); } ch->handlers->write->fp = NULL; ch->handlers->write->method = PHP_CURL_STDOUT; if (!Z_ISUNDEF(ch->handlers->write_header-...
DoS
0
static void _php_curl_reset_handlers(php_curl *ch) { if (!Z_ISUNDEF(ch->handlers->write->stream)) { zval_ptr_dtor(&ch->handlers->write->stream); ZVAL_UNDEF(&ch->handlers->write->stream); } ch->handlers->write->fp = NULL; ch->handlers->write->method = PHP_CURL_STDOUT; if (!Z_ISUNDEF(ch->handlers->write_header-...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,039
static void _php_curl_set_default_options(php_curl *ch) { char *cainfo; curl_easy_setopt(ch->cp, CURLOPT_NOPROGRESS, 1); curl_easy_setopt(ch->cp, CURLOPT_VERBOSE, 0); curl_easy_setopt(ch->cp, CURLOPT_ERRORBUFFER, ch->err.str); curl_easy_setopt(ch->cp, CURLOPT_WRITEFUNCTION, curl_write);...
DoS
0
static void _php_curl_set_default_options(php_curl *ch) { char *cainfo; curl_easy_setopt(ch->cp, CURLOPT_NOPROGRESS, 1); curl_easy_setopt(ch->cp, CURLOPT_VERBOSE, 0); curl_easy_setopt(ch->cp, CURLOPT_ERRORBUFFER, ch->err.str); curl_easy_setopt(ch->cp, CURLOPT_WRITEFUNCTION, curl_write);...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,040
void _php_curl_verify_handlers(php_curl *ch, int reporterror) /* {{{ */ { php_stream *stream; if (!ch || !ch->handlers) { return; } if (!Z_ISUNDEF(ch->handlers->std_err)) { stream = zend_fetch_resource(&ch->handlers->std_err, -1, NULL, NULL, 2, php_file_le_stream(), php_file_le_pstream()); if (stream == NULL...
DoS
0
void _php_curl_verify_handlers(php_curl *ch, int reporterror) /* {{{ */ { php_stream *stream; if (!ch || !ch->handlers) { return; } if (!Z_ISUNDEF(ch->handlers->std_err)) { stream = zend_fetch_resource(&ch->handlers->std_err, -1, NULL, NULL, 2, php_file_le_stream(), php_file_le_pstream()); if (stream == NULL...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,041
static php_curl *alloc_curl_handle() { php_curl *ch = ecalloc(1, sizeof(php_curl)); ch->to_free = ecalloc(1, sizeof(struct _php_curl_free)); ch->handlers = ecalloc(1, sizeof(php_curl_handlers)); ch->handlers->write = ecalloc(1, sizeof(php_curl_write)); ch->handlers...
DoS
0
static php_curl *alloc_curl_handle() { php_curl *ch = ecalloc(1, sizeof(php_curl)); ch->to_free = ecalloc(1, sizeof(struct _php_curl_free)); ch->handlers = ecalloc(1, sizeof(php_curl_handlers)); ch->handlers->write = ecalloc(1, sizeof(php_curl_write)); ch->handlers...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,042
static void create_certinfo(struct curl_certinfo *ci, zval *listcode) { int i; if (ci) { zval certhash; for (i=0; i<ci->num_of_certs; i++) { struct curl_slist *slist; array_init(&certhash); for (slist = ci->certinfo[i]; slist; slist = slist->next) { int len; char s[64]; char *tmp; strn...
DoS
0
static void create_certinfo(struct curl_certinfo *ci, zval *listcode) { int i; if (ci) { zval certhash; for (i=0; i<ci->num_of_certs; i++) { struct curl_slist *slist; array_init(&certhash); for (slist = ci->certinfo[i]; slist; slist = slist->next) { int len; char s[64]; char *tmp; strn...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,043
static int curl_debug(CURL *cp, curl_infotype type, char *buf, size_t buf_len, void *ctx) /* {{{ */ { php_curl *ch = (php_curl *)ctx; if (type == CURLINFO_HEADER_OUT) { if (ch->header.str) { zend_string_release(ch->header.str); } if (buf_len > 0) { ch->header.str = zend_string_init(buf, buf_len, 0); } ...
DoS
0
static int curl_debug(CURL *cp, curl_infotype type, char *buf, size_t buf_len, void *ctx) /* {{{ */ { php_curl *ch = (php_curl *)ctx; if (type == CURLINFO_HEADER_OUT) { if (ch->header.str) { zend_string_release(ch->header.str); } if (buf_len > 0) { ch->header.str = zend_string_init(buf, buf_len, 0); } ...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,044
static int curl_fnmatch(void *ctx, const char *pattern, const char *string) { php_curl *ch = (php_curl *) ctx; php_curl_fnmatch *t = ch->handlers->fnmatch; int rval = CURL_FNMATCHFUNC_FAIL; switch (t->method) { case PHP_CURL_USER: { zval argv[3]; zval retval; int error; zend_fcall_info fci; ZVAL_...
DoS
0
static int curl_fnmatch(void *ctx, const char *pattern, const char *string) { php_curl *ch = (php_curl *) ctx; php_curl_fnmatch *t = ch->handlers->fnmatch; int rval = CURL_FNMATCHFUNC_FAIL; switch (t->method) { case PHP_CURL_USER: { zval argv[3]; zval retval; int error; zend_fcall_info fci; ZVAL_...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,045
static void curl_free_slist(zval *el) { curl_slist_free_all(((struct curl_slist *)Z_PTR_P(el))); }
DoS
0
static void curl_free_slist(zval *el) { curl_slist_free_all(((struct curl_slist *)Z_PTR_P(el))); }
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,046
static void curl_free_string(void **string) { efree((char *)*string); }
DoS
0
static void curl_free_string(void **string) { efree((char *)*string); }
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,047
static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen) { php_curl *ch = (php_curl *) ctx; zval *func = &ch->handlers->passwd; zval argv[3]; zval retval; int error; int ret = -1; ZVAL_RES(&argv[0], ch->res); Z_ADDREF(argv[0]); ZVAL_STRING(&argv[1], prompt); ZVAL_LONG(&argv[2], buflen)...
DoS
0
static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen) { php_curl *ch = (php_curl *) ctx; zval *func = &ch->handlers->passwd; zval argv[3]; zval retval; int error; int ret = -1; ZVAL_RES(&argv[0], ch->res); Z_ADDREF(argv[0]); ZVAL_STRING(&argv[1], prompt); ZVAL_LONG(&argv[2], buflen)...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,048
static size_t curl_progress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow) { php_curl *ch = (php_curl *)clientp; php_curl_progress *t = ch->handlers->progress; size_t rval = 0; #if PHP_CURL_DEBUG fprintf(stderr, "curl_progress() called\n"); fprintf(stderr, "clientp = %x, dltotal = %f, ...
DoS
0
static size_t curl_progress(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow) { php_curl *ch = (php_curl *)clientp; php_curl_progress *t = ch->handlers->progress; size_t rval = 0; #if PHP_CURL_DEBUG fprintf(stderr, "curl_progress() called\n"); fprintf(stderr, "clientp = %x, dltotal = %f, ...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,049
static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx) { php_curl *ch = (php_curl *) ctx; php_curl_write *t = ch->handlers->write; size_t length = size * nmemb; #if PHP_CURL_DEBUG fprintf(stderr, "curl_write() called\n"); fprintf(stderr, "data = %s, size = %d, nmemb = %d, ctx = %x\n", data, si...
DoS
0
static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx) { php_curl *ch = (php_curl *) ctx; php_curl_write *t = ch->handlers->write; size_t length = size * nmemb; #if PHP_CURL_DEBUG fprintf(stderr, "curl_write() called\n"); fprintf(stderr, "data = %s, size = %d, nmemb = %d, ctx = %x\n", data, si...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,050
static size_t curl_write_nothing(char *data, size_t size, size_t nmemb, void *ctx) { return size * nmemb; }
DoS
0
static size_t curl_write_nothing(char *data, size_t size, size_t nmemb, void *ctx) { return size * nmemb; }
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,051
static int php_curl_option_str(php_curl *ch, zend_long option, const char *str, const int len, zend_bool make_copy) { CURLcode error = CURLE_OK; if (strlen(str) != len) { php_error_docref(NULL, E_WARNING, "Curl option contains invalid characters (\\0)"); return FAILURE; } #if LIBCURL_VERSION_NUM >= 0x071100 i...
DoS
0
static int php_curl_option_str(php_curl *ch, zend_long option, const char *str, const int len, zend_bool make_copy) { CURLcode error = CURLE_OK; if (strlen(str) != len) { php_error_docref(NULL, E_WARNING, "Curl option contains invalid characters (\\0)"); return FAILURE; } #if LIBCURL_VERSION_NUM >= 0x071100 i...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,052
static int php_curl_ssl_mutex_create(void **m) { if (*((MUTEX_T *) m) = tsrm_mutex_alloc()) { return SUCCESS; } else { return FAILURE; } }
DoS
0
static int php_curl_ssl_mutex_create(void **m) { if (*((MUTEX_T *) m) = tsrm_mutex_alloc()) { return SUCCESS; } else { return FAILURE; } }
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,053
static int php_curl_ssl_mutex_lock(void **m) { return tsrm_mutex_lock(*((MUTEX_T *) m)); }
DoS
0
static int php_curl_ssl_mutex_lock(void **m) { return tsrm_mutex_lock(*((MUTEX_T *) m)); }
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,054
static int php_curl_ssl_mutex_unlock(void **m) { return tsrm_mutex_unlock(*((MUTEX_T *) m)); }
DoS
0
static int php_curl_ssl_mutex_unlock(void **m) { return tsrm_mutex_unlock(*((MUTEX_T *) m)); }
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,055
static void split_certinfo(char *string, zval *hash) { char *org = estrdup(string); char *s = org; char *split; if(org) { do { char *key; char *val; char *tmp; split = strstr(s, "; "); if(split) *split = '\0'; key = s; tmp = memchr(key, '=', 64); if(tmp) { *tmp = '\0'; val =...
DoS
0
static void split_certinfo(char *string, zval *hash) { char *org = estrdup(string); char *s = org; char *split; if(org) { do { char *key; char *val; char *tmp; split = strstr(s, "; "); if(split) *split = '\0'; key = s; tmp = memchr(key, '=', 64); if(tmp) { *tmp = '\0'; val =...
@@ -2721,6 +2721,7 @@ static int _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue) /* {{{ curl_easy_setopt(ch->cp, CURLOPT_SHARE, sh->share); } } + break; #if LIBCURL_VERSION_NUM >= 0x07...
null
null
null
4,056
PHP_FUNCTION(pg_connect) { php_pgsql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0); }
DoS
0
PHP_FUNCTION(pg_connect) { php_pgsql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,057
PHP_FUNCTION(pg_connect_poll) { zval *pgsql_link; int id = -1; PGconn *pgsql; int ret; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_link) == FAILURE) { return; } if (pgsql_link == NULL) { RETURN_FALSE; } ZEND_FETCH_RESOURCE2(pgsql, PGconn *, pgsql_link, id, "PostgreSQL link", le_link, le_plink...
DoS
0
PHP_FUNCTION(pg_connect_poll) { zval *pgsql_link; int id = -1; PGconn *pgsql; int ret; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_link) == FAILURE) { return; } if (pgsql_link == NULL) { RETURN_FALSE; } ZEND_FETCH_RESOURCE2(pgsql, PGconn *, pgsql_link, id, "PostgreSQL link", le_link, le_plink...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,058
PHP_FUNCTION(pg_pconnect) { php_pgsql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1); }
DoS
0
PHP_FUNCTION(pg_pconnect) { php_pgsql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,059
PHP_FUNCTION(pg_close) { zval *pgsql_link = NULL; int id = -1, argc = ZEND_NUM_ARGS(); PGconn *pgsql; if (zend_parse_parameters(argc, "|r", &pgsql_link) == FAILURE) { return; } if (argc == 0) { id = FETCH_DEFAULT_LINK(); CHECK_DEFAULT_LINK(id); } if (pgsql_link == NULL && id == -1) { RETURN_FALSE; }...
DoS
0
PHP_FUNCTION(pg_close) { zval *pgsql_link = NULL; int id = -1, argc = ZEND_NUM_ARGS(); PGconn *pgsql; if (zend_parse_parameters(argc, "|r", &pgsql_link) == FAILURE) { return; } if (argc == 0) { id = FETCH_DEFAULT_LINK(); CHECK_DEFAULT_LINK(id); } if (pgsql_link == NULL && id == -1) { RETURN_FALSE; }...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,060
PHP_FUNCTION(pg_dbname) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_DBNAME); }
DoS
0
PHP_FUNCTION(pg_dbname) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_DBNAME); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,061
PHP_FUNCTION(pg_options) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_OPTIONS); }
DoS
0
PHP_FUNCTION(pg_options) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_OPTIONS); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,062
PHP_FUNCTION(pg_port) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_PORT); }
DoS
0
PHP_FUNCTION(pg_port) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_PORT); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,063
PHP_FUNCTION(pg_tty) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_TTY); }
DoS
0
PHP_FUNCTION(pg_tty) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_TTY); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,064
PHP_FUNCTION(pg_version) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_VERSION); }
DoS
0
PHP_FUNCTION(pg_version) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_VERSION); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,065
PHP_FUNCTION(pg_parameter_status) { zval *pgsql_link; int id; PGconn *pgsql; char *param; size_t len; if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "rs", &pgsql_link, &param, &len) == SUCCESS) { id = -1; } else if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &param, &len) == SUCCESS) ...
DoS
0
PHP_FUNCTION(pg_parameter_status) { zval *pgsql_link; int id; PGconn *pgsql; char *param; size_t len; if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "rs", &pgsql_link, &param, &len) == SUCCESS) { id = -1; } else if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &param, &len) == SUCCESS) ...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,066
PHP_FUNCTION(pg_ping) { zval *pgsql_link; int id; PGconn *pgsql; PGresult *res; if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "r", &pgsql_link) == SUCCESS) { id = -1; } else { pgsql_link = NULL; id = FETCH_DEFAULT_LINK(); } if (pgsql_link == NULL && id == -1) { RETURN_FALSE; }...
DoS
0
PHP_FUNCTION(pg_ping) { zval *pgsql_link; int id; PGconn *pgsql; PGresult *res; if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "r", &pgsql_link) == SUCCESS) { id = -1; } else { pgsql_link = NULL; id = FETCH_DEFAULT_LINK(); } if (pgsql_link == NULL && id == -1) { RETURN_FALSE; }...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,067
PHP_FUNCTION(pg_query) { zval *pgsql_link = NULL; char *query; int id = -1, argc = ZEND_NUM_ARGS(); size_t query_len; int leftover = 0; PGconn *pgsql; PGresult *pgsql_result; ExecStatusType status; pgsql_result_handle *pg_result; if (argc == 1) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &query, &que...
DoS
0
PHP_FUNCTION(pg_query) { zval *pgsql_link = NULL; char *query; int id = -1, argc = ZEND_NUM_ARGS(); size_t query_len; int leftover = 0; PGconn *pgsql; PGresult *pgsql_result; ExecStatusType status; pgsql_result_handle *pg_result; if (argc == 1) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &query, &que...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,068
PHP_FUNCTION(pg_query_params) { zval *pgsql_link = NULL; zval *pv_param_arr, *tmp; char *query; size_t query_len; int id = -1, argc = ZEND_NUM_ARGS(); int leftover = 0; int num_params = 0; char **params = NULL; PGconn *pgsql; PGresult *pgsql_result; ExecStatusType status; pgsql_result_handle *pg_result; ...
DoS
0
PHP_FUNCTION(pg_query_params) { zval *pgsql_link = NULL; zval *pv_param_arr, *tmp; char *query; size_t query_len; int id = -1, argc = ZEND_NUM_ARGS(); int leftover = 0; int num_params = 0; char **params = NULL; PGconn *pgsql; PGresult *pgsql_result; ExecStatusType status; pgsql_result_handle *pg_result; ...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,069
PHP_FUNCTION(pg_prepare) { zval *pgsql_link = NULL; char *query, *stmtname; size_t query_len, stmtname_len; int id = -1, argc = ZEND_NUM_ARGS(); int leftover = 0; PGconn *pgsql; PGresult *pgsql_result; ExecStatusType status; pgsql_result_handle *pg_result; if (argc == 2) { if (zend_parse_parameters(argc, "...
DoS
0
PHP_FUNCTION(pg_prepare) { zval *pgsql_link = NULL; char *query, *stmtname; size_t query_len, stmtname_len; int id = -1, argc = ZEND_NUM_ARGS(); int leftover = 0; PGconn *pgsql; PGresult *pgsql_result; ExecStatusType status; pgsql_result_handle *pg_result; if (argc == 2) { if (zend_parse_parameters(argc, "...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,070
PHP_FUNCTION(pg_execute) { zval *pgsql_link = NULL; zval *pv_param_arr, *tmp; char *stmtname; size_t stmtname_len; int id = -1, argc = ZEND_NUM_ARGS(); int leftover = 0; int num_params = 0; char **params = NULL; PGconn *pgsql; PGresult *pgsql_result; ExecStatusType status; pgsql_result_handle *pg_result; ...
DoS
0
PHP_FUNCTION(pg_execute) { zval *pgsql_link = NULL; zval *pv_param_arr, *tmp; char *stmtname; size_t stmtname_len; int id = -1, argc = ZEND_NUM_ARGS(); int leftover = 0; int num_params = 0; char **params = NULL; PGconn *pgsql; PGresult *pgsql_result; ExecStatusType status; pgsql_result_handle *pg_result; ...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,071
PHP_FUNCTION(pg_num_rows) { php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_NUM_ROWS); }
DoS
0
PHP_FUNCTION(pg_num_rows) { php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_NUM_ROWS); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,072
PHP_FUNCTION(pg_num_fields) { php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_NUM_FIELDS); }
DoS
0
PHP_FUNCTION(pg_num_fields) { php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_NUM_FIELDS); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,073
PHP_FUNCTION(pg_affected_rows) { php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_CMD_TUPLES); }
DoS
0
PHP_FUNCTION(pg_affected_rows) { php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_CMD_TUPLES); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,074
PHP_FUNCTION(pg_last_notice) { zval *pgsql_link = NULL; PGconn *pg_link; int id = -1; php_pgsql_notice *notice; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_link) == FAILURE) { return; } if (pgsql_link == NULL) { RETURN_FALSE; } /* Just to check if user passed valid resoruce */ ZEND_FETCH_R...
DoS
0
PHP_FUNCTION(pg_last_notice) { zval *pgsql_link = NULL; PGconn *pg_link; int id = -1; php_pgsql_notice *notice; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_link) == FAILURE) { return; } if (pgsql_link == NULL) { RETURN_FALSE; } /* Just to check if user passed valid resoruce */ ZEND_FETCH_R...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,075
PHP_FUNCTION(pg_field_table) { zval *result; pgsql_result_handle *pg_result; zend_long fnum = -1; zend_bool return_oid = 0; Oid oid; smart_str hash_key = {0}; char *table_name; zend_resource *field_table; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|b", &result, &fnum, &return_oid) == FAILURE) { return; ...
DoS
0
PHP_FUNCTION(pg_field_table) { zval *result; pgsql_result_handle *pg_result; zend_long fnum = -1; zend_bool return_oid = 0; Oid oid; smart_str hash_key = {0}; char *table_name; zend_resource *field_table; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl|b", &result, &fnum, &return_oid) == FAILURE) { return; ...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,076
PHP_FUNCTION(pg_field_name) { php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_NAME); }
DoS
0
PHP_FUNCTION(pg_field_name) { php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_NAME); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,077
PHP_FUNCTION(pg_field_size) { php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_SIZE); }
DoS
0
PHP_FUNCTION(pg_field_size) { php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_SIZE); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,078
PHP_FUNCTION(pg_field_type) { php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_TYPE); }
DoS
0
PHP_FUNCTION(pg_field_type) { php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_TYPE); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,079
PHP_FUNCTION(pg_field_type_oid) { php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_TYPE_OID); }
DoS
0
PHP_FUNCTION(pg_field_type_oid) { php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_TYPE_OID); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,080
PHP_FUNCTION(pg_field_num) { zval *result; char *field; size_t field_len; PGresult *pgsql_result; pgsql_result_handle *pg_result; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &result, &field, &field_len) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, result, -1, "PostgreSQ...
DoS
0
PHP_FUNCTION(pg_field_num) { zval *result; char *field; size_t field_len; PGresult *pgsql_result; pgsql_result_handle *pg_result; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs", &result, &field, &field_len) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, result, -1, "PostgreSQ...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,081
PHP_FUNCTION(pg_fetch_result) { zval *result, *field=NULL; zend_long row; PGresult *pgsql_result; pgsql_result_handle *pg_result; int field_offset, pgsql_row, argc = ZEND_NUM_ARGS(); if (argc == 2) { if (zend_parse_parameters(argc, "rz", &result, &field) == FAILURE) { return; } } else { if (zend_parse_...
DoS
0
PHP_FUNCTION(pg_fetch_result) { zval *result, *field=NULL; zend_long row; PGresult *pgsql_result; pgsql_result_handle *pg_result; int field_offset, pgsql_row, argc = ZEND_NUM_ARGS(); if (argc == 2) { if (zend_parse_parameters(argc, "rz", &result, &field) == FAILURE) { return; } } else { if (zend_parse_...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,082
PHP_FUNCTION(pg_fetch_row) { php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, PGSQL_NUM, 0); }
DoS
0
PHP_FUNCTION(pg_fetch_row) { php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, PGSQL_NUM, 0); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,083
PHP_FUNCTION(pg_fetch_array) { php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, PGSQL_BOTH, 0); }
DoS
0
PHP_FUNCTION(pg_fetch_array) { php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, PGSQL_BOTH, 0); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,084
PHP_FUNCTION(pg_fetch_all) { zval *result; PGresult *pgsql_result; pgsql_result_handle *pg_result; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &result) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, result, -1, "PostgreSQL result", le_result); pgsql_result = pg_result->res...
DoS
0
PHP_FUNCTION(pg_fetch_all) { zval *result; PGresult *pgsql_result; pgsql_result_handle *pg_result; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &result) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, result, -1, "PostgreSQL result", le_result); pgsql_result = pg_result->res...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,085
PHP_FUNCTION(pg_result_seek) { zval *result; zend_long row; pgsql_result_handle *pg_result; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &result, &row) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, result, -1, "PostgreSQL result", le_result); if (row < 0 || row >= PQntupl...
DoS
0
PHP_FUNCTION(pg_result_seek) { zval *result; zend_long row; pgsql_result_handle *pg_result; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &result, &row) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, result, -1, "PostgreSQL result", le_result); if (row < 0 || row >= PQntupl...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,086
PHP_FUNCTION(pg_field_prtlen) { php_pgsql_data_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_PG_DATA_LENGTH); }
DoS
0
PHP_FUNCTION(pg_field_prtlen) { php_pgsql_data_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_PG_DATA_LENGTH); }
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,087
PHP_FUNCTION(pg_free_result) { zval *result; pgsql_result_handle *pg_result; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &result) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, result, -1, "PostgreSQL result", le_result); if (Z_RES_P(result) == NULL) { RETURN_FALSE; } ze...
DoS
0
PHP_FUNCTION(pg_free_result) { zval *result; pgsql_result_handle *pg_result; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &result) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, result, -1, "PostgreSQL result", le_result); if (Z_RES_P(result) == NULL) { RETURN_FALSE; } ze...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,088
PHP_FUNCTION(pg_last_oid) { zval *result; PGresult *pgsql_result; pgsql_result_handle *pg_result; #ifdef HAVE_PQOIDVALUE Oid oid; #endif if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &result) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, result, -1, "PostgreSQL result", le_r...
DoS
0
PHP_FUNCTION(pg_last_oid) { zval *result; PGresult *pgsql_result; pgsql_result_handle *pg_result; #ifdef HAVE_PQOIDVALUE Oid oid; #endif if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &result) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pg_result, pgsql_result_handle *, result, -1, "PostgreSQL result", le_r...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,089
PHP_FUNCTION(pg_trace) { char *z_filename, *mode = "w"; size_t z_filename_len, mode_len; zval *pgsql_link = NULL; int id = -1, argc = ZEND_NUM_ARGS(); PGconn *pgsql; FILE *fp = NULL; php_stream *stream; id = FETCH_DEFAULT_LINK(); if (zend_parse_parameters(argc, "s|sr", &z_filename, &z_filename_len, &mode, &mo...
DoS
0
PHP_FUNCTION(pg_trace) { char *z_filename, *mode = "w"; size_t z_filename_len, mode_len; zval *pgsql_link = NULL; int id = -1, argc = ZEND_NUM_ARGS(); PGconn *pgsql; FILE *fp = NULL; php_stream *stream; id = FETCH_DEFAULT_LINK(); if (zend_parse_parameters(argc, "s|sr", &z_filename, &z_filename_len, &mode, &mo...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,090
PHP_FUNCTION(pg_untrace) { zval *pgsql_link = NULL; int id = -1, argc = ZEND_NUM_ARGS(); PGconn *pgsql; if (zend_parse_parameters(argc, "|r", &pgsql_link) == FAILURE) { return; } if (argc == 0) { id = FETCH_DEFAULT_LINK(); CHECK_DEFAULT_LINK(id); } if (pgsql_link == NULL && id == -1) { RETURN_FALSE...
DoS
0
PHP_FUNCTION(pg_untrace) { zval *pgsql_link = NULL; int id = -1, argc = ZEND_NUM_ARGS(); PGconn *pgsql; if (zend_parse_parameters(argc, "|r", &pgsql_link) == FAILURE) { return; } if (argc == 0) { id = FETCH_DEFAULT_LINK(); CHECK_DEFAULT_LINK(id); } if (pgsql_link == NULL && id == -1) { RETURN_FALSE...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,091
PHP_FUNCTION(pg_lo_create) { zval *pgsql_link = NULL, *oid = NULL; PGconn *pgsql; Oid pgsql_oid, wanted_oid = InvalidOid; int id = -1, argc = ZEND_NUM_ARGS(); if (zend_parse_parameters(argc, "|zz", &pgsql_link, &oid) == FAILURE) { return; } if ((argc == 1) && (Z_TYPE_P(pgsql_link) != IS_RESOURCE)) { oid = ...
DoS
0
PHP_FUNCTION(pg_lo_create) { zval *pgsql_link = NULL, *oid = NULL; PGconn *pgsql; Oid pgsql_oid, wanted_oid = InvalidOid; int id = -1, argc = ZEND_NUM_ARGS(); if (zend_parse_parameters(argc, "|zz", &pgsql_link, &oid) == FAILURE) { return; } if ((argc == 1) && (Z_TYPE_P(pgsql_link) != IS_RESOURCE)) { oid = ...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,092
PHP_FUNCTION(pg_lo_open) { zval *pgsql_link = NULL; zend_long oid_long; char *oid_string, *end_ptr, *mode_string; size_t oid_strlen, mode_strlen; PGconn *pgsql; Oid oid; int id = -1, pgsql_mode=0, pgsql_lofd; int create = 0; pgLofp *pgsql_lofp; int argc = ZEND_NUM_ARGS(); /* accept string type since Oid is ...
DoS
0
PHP_FUNCTION(pg_lo_open) { zval *pgsql_link = NULL; zend_long oid_long; char *oid_string, *end_ptr, *mode_string; size_t oid_strlen, mode_strlen; PGconn *pgsql; Oid oid; int id = -1, pgsql_mode=0, pgsql_lofd; int create = 0; pgLofp *pgsql_lofp; int argc = ZEND_NUM_ARGS(); /* accept string type since Oid is ...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,093
PHP_FUNCTION(pg_lo_close) { zval *pgsql_lofp; pgLofp *pgsql; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_lofp) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pgsql, pgLofp *, pgsql_lofp, -1, "PostgreSQL large object", le_lofp); if (lo_close((PGconn *)pgsql->conn, pgsql->lofd) < 0) { php_error_docr...
DoS
0
PHP_FUNCTION(pg_lo_close) { zval *pgsql_lofp; pgLofp *pgsql; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_lofp) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pgsql, pgLofp *, pgsql_lofp, -1, "PostgreSQL large object", le_lofp); if (lo_close((PGconn *)pgsql->conn, pgsql->lofd) < 0) { php_error_docr...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,094
PHP_FUNCTION(pg_lo_read) { zval *pgsql_id; zend_long len; size_t buf_len = PGSQL_LO_READ_BUF_SIZE; int nbytes, argc = ZEND_NUM_ARGS(); zend_string *buf; pgLofp *pgsql; if (zend_parse_parameters(argc, "r|l", &pgsql_id, &len) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pgsql, pgLofp *, pgsql_id, -1, "Postgre...
DoS
0
PHP_FUNCTION(pg_lo_read) { zval *pgsql_id; zend_long len; size_t buf_len = PGSQL_LO_READ_BUF_SIZE; int nbytes, argc = ZEND_NUM_ARGS(); zend_string *buf; pgLofp *pgsql; if (zend_parse_parameters(argc, "r|l", &pgsql_id, &len) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pgsql, pgLofp *, pgsql_id, -1, "Postgre...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,095
PHP_FUNCTION(pg_lo_write) { zval *pgsql_id; char *str; zend_long z_len; size_t str_len, nbytes; size_t len; pgLofp *pgsql; int argc = ZEND_NUM_ARGS(); if (zend_parse_parameters(argc, "rs|l", &pgsql_id, &str, &str_len, &z_len) == FAILURE) { return; } if (argc > 2) { if (z_len > (zend_long)str_len) ...
DoS
0
PHP_FUNCTION(pg_lo_write) { zval *pgsql_id; char *str; zend_long z_len; size_t str_len, nbytes; size_t len; pgLofp *pgsql; int argc = ZEND_NUM_ARGS(); if (zend_parse_parameters(argc, "rs|l", &pgsql_id, &str, &str_len, &z_len) == FAILURE) { return; } if (argc > 2) { if (z_len > (zend_long)str_len) ...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,096
PHP_FUNCTION(pg_lo_read_all) { zval *pgsql_id; int tbytes; volatile int nbytes; char buf[PGSQL_LO_READ_BUF_SIZE]; pgLofp *pgsql; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_id) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pgsql, pgLofp *, pgsql_id, -1, "PostgreSQL large object", le_lofp); tby...
DoS
0
PHP_FUNCTION(pg_lo_read_all) { zval *pgsql_id; int tbytes; volatile int nbytes; char buf[PGSQL_LO_READ_BUF_SIZE]; pgLofp *pgsql; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pgsql_id) == FAILURE) { return; } ZEND_FETCH_RESOURCE(pgsql, pgLofp *, pgsql_id, -1, "PostgreSQL large object", le_lofp); tby...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,097
PHP_FUNCTION(pg_lo_import) { zval *pgsql_link = NULL, *oid = NULL; char *file_in; int id = -1; size_t name_len; int argc = ZEND_NUM_ARGS(); PGconn *pgsql; Oid returned_oid; if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "rp|z", &pgsql_link, &file_in, &name_len, &oid) == SUCCESS) { ; } ...
DoS
0
PHP_FUNCTION(pg_lo_import) { zval *pgsql_link = NULL, *oid = NULL; char *file_in; int id = -1; size_t name_len; int argc = ZEND_NUM_ARGS(); PGconn *pgsql; Oid returned_oid; if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc, "rp|z", &pgsql_link, &file_in, &name_len, &oid) == SUCCESS) { ; } ...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,098
PHP_FUNCTION(pg_lo_export) { zval *pgsql_link = NULL; char *file_out, *oid_string, *end_ptr; size_t oid_strlen; int id = -1; size_t name_len; zend_long oid_long; Oid oid; PGconn *pgsql; int argc = ZEND_NUM_ARGS(); /* allow string to handle large OID value correctly */ if (zend_parse_parameters_ex(ZEND_PARSE...
DoS
0
PHP_FUNCTION(pg_lo_export) { zval *pgsql_link = NULL; char *file_out, *oid_string, *end_ptr; size_t oid_strlen; int id = -1; size_t name_len; zend_long oid_long; Oid oid; PGconn *pgsql; int argc = ZEND_NUM_ARGS(); /* allow string to handle large OID value correctly */ if (zend_parse_parameters_ex(ZEND_PARSE...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null
4,099
PHP_FUNCTION(pg_set_error_verbosity) { zval *pgsql_link = NULL; zend_long verbosity; int id = -1, argc = ZEND_NUM_ARGS(); PGconn *pgsql; if (argc == 1) { if (zend_parse_parameters(argc, "l", &verbosity) == FAILURE) { return; } id = FETCH_DEFAULT_LINK(); CHECK_DEFAULT_LINK(id); } else { if (zend_pars...
DoS
0
PHP_FUNCTION(pg_set_error_verbosity) { zval *pgsql_link = NULL; zend_long verbosity; int id = -1, argc = ZEND_NUM_ARGS(); PGconn *pgsql; if (argc == 1) { if (zend_parse_parameters(argc, "l", &verbosity) == FAILURE) { return; } id = FETCH_DEFAULT_LINK(); CHECK_DEFAULT_LINK(id); } else { if (zend_pars...
@@ -6445,6 +6445,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } ...
null
null
null