idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
12,400
pixman_image_create_bits_no_clear (pixman_format_code_t format, int width, int height, uint32_t * bits, int rowstride_bytes) { return create_bits_image_internal ( format, width, height, bits, rowstride_bytes, FALSE); }
DoS Exec Code Overflow
0
pixman_image_create_bits_no_clear (pixman_format_code_t format, int width, int height, uint32_t * bits, int rowstride_bytes) { return create_bits_image_internal ( format, width, height, bits, rowstride_bytes, FALSE); }
@@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format, if (_pixman_multiply_overflows_size (height, stride)) return NULL; - buf_size = height * stride; + buf_size = (size_t)height * stride; if (rowstride_bytes) *rowstride_bytes = stride;
CWE-189
null
null
12,401
replicate_pixel_32 (bits_image_t * bits, int x, int y, int width, uint32_t * buffer) { uint32_t color; uint32_t *end; color = bits->fetch_pixel_32 (bits, x, y); end = buffer + width; while (buffer < end) *(buffer++) = color; }...
DoS Exec Code Overflow
0
replicate_pixel_32 (bits_image_t * bits, int x, int y, int width, uint32_t * buffer) { uint32_t color; uint32_t *end; color = bits->fetch_pixel_32 (bits, x, y); end = buffer + width; while (buffer < end) *(buffer++) = color; }...
@@ -926,7 +926,7 @@ create_bits (pixman_format_code_t format, if (_pixman_multiply_overflows_size (height, stride)) return NULL; - buf_size = height * stride; + buf_size = (size_t)height * stride; if (rowstride_bytes) *rowstride_bytes = stride;
CWE-189
null
null
12,402
formats(ImlibLoader * l) { static const char *const list_formats[] = { "pnm", "ppm", "pgm", "pbm", "pam" }; int i; l->num_formats = sizeof(list_formats) / sizeof(char *); l->formats = malloc(sizeof(char *) * l->num_formats); for (i = 0; i < l->num_formats; i++) l->formats[i...
DoS
0
formats(ImlibLoader * l) { static const char *const list_formats[] = { "pnm", "ppm", "pgm", "pbm", "pam" }; int i; l->num_formats = sizeof(list_formats) / sizeof(char *); l->formats = malloc(sizeof(char *) * l->num_formats); for (i = 0; i < l->num_formats; i++) l->formats[i...
@@ -229,7 +229,7 @@ load(ImlibImage * im, ImlibProgressFunction progress, } } iptr = idata; - if (v == 255) + if (v == 0 || v == 255) { for (x = 0; x < w; x++) ...
CWE-189
null
null
12,403
save(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity) { int rc; FILE *f; DATA8 *buf, *bptr; DATA32 *ptr; int x, y, pl = 0; char pper = 0; /* no image data? abort */ if (!im->data) ...
DoS
0
save(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity) { int rc; FILE *f; DATA8 *buf, *bptr; DATA32 *ptr; int x, y, pl = 0; char pper = 0; /* no image data? abort */ if (!im->data) ...
@@ -229,7 +229,7 @@ load(ImlibImage * im, ImlibProgressFunction progress, } } iptr = idata; - if (v == 255) + if (v == 0 || v == 255) { for (x = 0; x < w; x++) ...
CWE-189
null
null
12,404
cid_get_offset( FT_Byte* *start, FT_Byte offsize ) { FT_ULong result; FT_Byte* p = *start; for ( result = 0; offsize > 0; offsize-- ) { result <<= 8; result |= *p++; } *start = p; return (FT_Long)result; }
DoS
0
cid_get_offset( FT_Byte* *start, FT_Byte offsize ) { FT_ULong result; FT_Byte* p = *start; for ( result = 0; offsize > 0; offsize-- ) { result <<= 8; result |= *p++; } *start = p; return (FT_Long)result; }
@@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 font loader (body). */ /* */ -/* Copyright 1996-2006, 2009, 2011-2013 by ...
CWE-20
null
null
12,405
cid_load_keyword( CID_Face face, CID_Loader* loader, const T1_Field keyword ) { FT_Error error; CID_Parser* parser = &loader->parser; FT_Byte* object; void* dummy_object; CID_FaceInfo cid = &face->cid; /* if the keywo...
DoS
0
cid_load_keyword( CID_Face face, CID_Loader* loader, const T1_Field keyword ) { FT_Error error; CID_Parser* parser = &loader->parser; FT_Byte* object; void* dummy_object; CID_FaceInfo cid = &face->cid; /* if the keywo...
@@ -4,7 +4,7 @@ /* */ /* CID-keyed Type1 font loader (body). */ /* */ -/* Copyright 1996-2006, 2009, 2011-2013 by ...
CWE-20
null
null
12,406
parse_charstrings( T1_Face face, T1_Loader loader ) { T1_Parser parser = &loader->parser; PS_Table code_table = &loader->charstrings; PS_Table name_table = &loader->glyph_names; PS_Table swap_table = &loader->swap_table; FT_Memory ...
DoS
0
parse_charstrings( T1_Face face, T1_Loader loader ) { T1_Parser parser = &loader->parser; PS_Table code_table = &loader->charstrings; PS_Table name_table = &loader->glyph_names; PS_Table swap_table = &loader->swap_table; FT_Memory ...
@@ -4,7 +4,7 @@ /* */ /* Type 1 font loader (body). */ /* */ -/* Copyright 1996-2013 by ...
CWE-20
null
null
12,407
parse_encoding( T1_Face face, T1_Loader loader ) { T1_Parser parser = &loader->parser; FT_Byte* cur; FT_Byte* limit = parser->root.limit; PSAux_Service psaux = (PSAux_Service)face->psaux; T1_Skip_Spaces( parser ); cur = parser->root.cursor; if ( cur >= lim...
DoS
0
parse_encoding( T1_Face face, T1_Loader loader ) { T1_Parser parser = &loader->parser; FT_Byte* cur; FT_Byte* limit = parser->root.limit; PSAux_Service psaux = (PSAux_Service)face->psaux; T1_Skip_Spaces( parser ); cur = parser->root.cursor; if ( cur >= lim...
@@ -4,7 +4,7 @@ /* */ /* Type 1 font loader (body). */ /* */ -/* Copyright 1996-2013 by ...
CWE-20
null
null
12,408
_cdf_tole2(uint16_t sv) { uint16_t rv; uint8_t *s = (uint8_t *)(void *)&sv; uint8_t *d = (uint8_t *)(void *)&rv; d[0] = s[1]; d[1] = s[0]; return rv; }
DoS
0
_cdf_tole2(uint16_t sv) { uint16_t rv; uint8_t *s = (uint8_t *)(void *)&sv; uint8_t *d = (uint8_t *)(void *)&rv; d[0] = s[1]; d[1] = s[0]; return rv; }
@@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: cdf.c,v 1.53 2013/02/26 16:20:42 christos Exp $") +FILE_RCSID("@(#)$File: cdf.c,v 1.55 2014/02/27 23:26:17 christos Exp $") #endif #include <assert.h> @@ -688,11 +688,13 @@ out: int cdf_read_short_stream(const cdf_info_t *info, const c...
null
null
null
12,409
_cdf_tole8(uint64_t sv) { uint64_t rv; uint8_t *s = (uint8_t *)(void *)&sv; uint8_t *d = (uint8_t *)(void *)&rv; d[0] = s[7]; d[1] = s[6]; d[2] = s[5]; d[3] = s[4]; d[4] = s[3]; d[5] = s[2]; d[6] = s[1]; d[7] = s[0]; return rv; }
DoS
0
_cdf_tole8(uint64_t sv) { uint64_t rv; uint8_t *s = (uint8_t *)(void *)&sv; uint8_t *d = (uint8_t *)(void *)&rv; d[0] = s[7]; d[1] = s[6]; d[2] = s[5]; d[3] = s[4]; d[4] = s[3]; d[5] = s[2]; d[6] = s[1]; d[7] = s[0]; return rv; }
@@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: cdf.c,v 1.53 2013/02/26 16:20:42 christos Exp $") +FILE_RCSID("@(#)$File: cdf.c,v 1.55 2014/02/27 23:26:17 christos Exp $") #endif #include <assert.h> @@ -688,11 +688,13 @@ out: int cdf_read_short_stream(const cdf_info_t *info, const c...
null
null
null
12,410
cdf_check_stream_offset(const cdf_stream_t *sst, const cdf_header_t *h, const void *p, size_t tail, int line) { const char *b = (const char *)sst->sst_tab; const char *e = ((const char *)p) + tail; (void)&line; if (e >= b && (size_t)(e - b) <= CDF_SEC_SIZE(h) * sst->sst_len) return 0; DPRINTF(("%d: offset be...
DoS
0
cdf_check_stream_offset(const cdf_stream_t *sst, const cdf_header_t *h, const void *p, size_t tail, int line) { const char *b = (const char *)sst->sst_tab; const char *e = ((const char *)p) + tail; (void)&line; if (e >= b && (size_t)(e - b) <= CDF_SEC_SIZE(h) * sst->sst_len) return 0; DPRINTF(("%d: offset be...
@@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: cdf.c,v 1.53 2013/02/26 16:20:42 christos Exp $") +FILE_RCSID("@(#)$File: cdf.c,v 1.55 2014/02/27 23:26:17 christos Exp $") #endif #include <assert.h> @@ -688,11 +688,13 @@ out: int cdf_read_short_stream(const cdf_info_t *info, const c...
null
null
null
12,411
bool Tar::Create(const wxString& dmod_folder, double *compression_ratio, wxProgressDialog* aProgressDialog) { if (!bCanCompress) return wxEmptyString; wxString strCwd = ::wxGetCwd(); ::wxSetWorkingDirectory(strCompressDir); bool result = CreateReal(dmod_folder, compression_ratio, aProgressDialog); ::wx...
Dir. Trav.
0
bool Tar::Create(const wxString& dmod_folder, double *compression_ratio, wxProgressDialog* aProgressDialog) { if (!bCanCompress) return wxEmptyString; wxString strCwd = ::wxGetCwd(); ::wxSetWorkingDirectory(strCompressDir); bool result = CreateReal(dmod_folder, compression_ratio, aProgressDialog); ::wx...
@@ -3,7 +3,7 @@ * Copyright (C) 2004 Andrew Reading * Copyright (C) 2005, 2006 Dan Walma - * Copyright (C) 2008, 2014 Sylvain Beucler + * Copyright (C) 2008, 2014, 2018 Sylvain Beucler * This file is part of GNU FreeDink @@ -31,6 +31,7 @@ #include <wx/intl.h> #include <wx/log.h> #include <wx/filename...
CWE-22
null
null
12,412
bool Tar::CreateReal(const wxString& dmod_folder, double *compression_ratio, wxProgressDialog* aProgressDialog) { bool aborted = false; wxArrayString wxasFileList; aProgressDialog->Update(0, _("Listing files...")); IOUtils::GetAllDModFiles(strCompressDir, wxasFileList); int iNumEntries = wxasFileList.GetCo...
Dir. Trav.
0
bool Tar::CreateReal(const wxString& dmod_folder, double *compression_ratio, wxProgressDialog* aProgressDialog) { bool aborted = false; wxArrayString wxasFileList; aProgressDialog->Update(0, _("Listing files...")); IOUtils::GetAllDModFiles(strCompressDir, wxasFileList); int iNumEntries = wxasFileList.GetCo...
@@ -3,7 +3,7 @@ * Copyright (C) 2004 Andrew Reading * Copyright (C) 2005, 2006 Dan Walma - * Copyright (C) 2008, 2014 Sylvain Beucler + * Copyright (C) 2008, 2014, 2018 Sylvain Beucler * This file is part of GNU FreeDink @@ -31,6 +31,7 @@ #include <wx/intl.h> #include <wx/log.h> #include <wx/filename...
CWE-22
null
null
12,413
bool Tar::FillHeader(wxString &mFilePath, const wxString& dmod_folder, char *header512, fileinfo *finfo) { if (!S_ISREG(finfo->mode)) return false; char* ptr = header512; strncpy(ptr, (dmod_folder.Lower() + _T("/") + mFilePath.Lower()).mb_str(wxConvUTF8), 100); ptr += 100; strncpy(ptr, "0100644", 8);...
Dir. Trav.
0
bool Tar::FillHeader(wxString &mFilePath, const wxString& dmod_folder, char *header512, fileinfo *finfo) { if (!S_ISREG(finfo->mode)) return false; char* ptr = header512; strncpy(ptr, (dmod_folder.Lower() + _T("/") + mFilePath.Lower()).mb_str(wxConvUTF8), 100); ptr += 100; strncpy(ptr, "0100644", 8);...
@@ -3,7 +3,7 @@ * Copyright (C) 2004 Andrew Reading * Copyright (C) 2005, 2006 Dan Walma - * Copyright (C) 2008, 2014 Sylvain Beucler + * Copyright (C) 2008, 2014, 2018 Sylvain Beucler * This file is part of GNU FreeDink @@ -31,6 +31,7 @@ #include <wx/intl.h> #include <wx/log.h> #include <wx/filename...
CWE-22
null
null
12,414
Tar::Tar(wxString& szFile) : DFile(szFile) { bCanCompress = false; }
Dir. Trav.
0
Tar::Tar(wxString& szFile) : DFile(szFile) { bCanCompress = false; }
@@ -3,7 +3,7 @@ * Copyright (C) 2004 Andrew Reading * Copyright (C) 2005, 2006 Dan Walma - * Copyright (C) 2008, 2014 Sylvain Beucler + * Copyright (C) 2008, 2014, 2018 Sylvain Beucler * This file is part of GNU FreeDink @@ -31,6 +31,7 @@ #include <wx/intl.h> #include <wx/log.h> #include <wx/filename...
CWE-22
null
null
12,415
basic_authentication_encode (const char *user, const char *passwd) { char *t1, *t2; int len1 = strlen (user) + 1 + strlen (passwd); t1 = (char *)alloca (len1 + 1); sprintf (t1, "%s:%s", user, passwd); t2 = (char *)alloca (BASE64_LENGTH (len1) + 1); wget_base64_encode (t1, len1, t2); return concat_strin...
null
0
basic_authentication_encode (const char *user, const char *passwd) { char *t1, *t2; int len1 = strlen (user) + 1 + strlen (passwd); t1 = (char *)alloca (len1 + 1); sprintf (t1, "%s:%s", user, passwd); t2 = (char *)alloca (BASE64_LENGTH (len1) + 1); wget_base64_encode (t1, len1, t2); return concat_strin...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,416
body_file_send (int sock, const char *file_name, wgint promised_size, FILE *warc_tmp) { static char chunk[8192]; wgint written = 0; int write_error; FILE *fp; DEBUGP (("[writing BODY file %s ... ", file_name)); fp = fopen (file_name, "rb"); if (!fp) return -1; while (!feof (fp) && written < promis...
null
0
body_file_send (int sock, const char *file_name, wgint promised_size, FILE *warc_tmp) { static char chunk[8192]; wgint written = 0; int write_error; FILE *fp; DEBUGP (("[writing BODY file %s ... ", file_name)); fp = fopen (file_name, "rb"); if (!fp) return -1; while (!feof (fp) && written < promis...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,417
check_auth (const struct url *u, char *user, char *passwd, struct response *resp, struct request *req, bool *ntlm_seen_ref, bool *retry, bool *basic_auth_finished_ref, bool *auth_finished_ref) { uerr_t auth_err = RETROK; bool basic_auth_finished = *basic_auth_finished_ref; bool auth_finish...
null
0
check_auth (const struct url *u, char *user, char *passwd, struct response *resp, struct request *req, bool *ntlm_seen_ref, bool *retry, bool *basic_auth_finished_ref, bool *auth_finished_ref) { uerr_t auth_err = RETROK; bool basic_auth_finished = *basic_auth_finished_ref; bool auth_finish...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,418
check_end (const char *p) { if (!p) return false; while (c_isspace (*p)) ++p; if (!*p || (p[0] == 'G' && p[1] == 'M' && p[2] == 'T') || ((p[0] == '+' || p[0] == '-') && c_isdigit (p[1]))) return true; else return false; }
null
0
check_end (const char *p) { if (!p) return false; while (c_isspace (*p)) ++p; if (!*p || (p[0] == 'G' && p[1] == 'M' && p[2] == 'T') || ((p[0] == '+' || p[0] == '-') && c_isdigit (p[1]))) return true; else return false; }
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,419
check_file_output (const struct url *u, struct http_stat *hs, struct response *resp, char *hdrval, size_t hdrsize) { /* Determine the local filename if needed. Notice that if -O is used * hstat.local_file is set by http_loop to the argument of -O. */ if (!hs->local_file) { char *loca...
null
0
check_file_output (const struct url *u, struct http_stat *hs, struct response *resp, char *hdrval, size_t hdrsize) { /* Determine the local filename if needed. Notice that if -O is used * hstat.local_file is set by http_loop to the argument of -O. */ if (!hs->local_file) { char *loca...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,420
check_retry_on_http_error (const int statcode) { const char *tok = opt.retry_on_http_error; while (tok && *tok) { if (atoi (tok) == statcode) return true; if ((tok = strchr (tok, ','))) ++tok; } return false; }
null
0
check_retry_on_http_error (const int statcode) { const char *tok = opt.retry_on_http_error; while (tok && *tok) { if (atoi (tok) == statcode) return true; if ((tok = strchr (tok, ','))) ++tok; } return false; }
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,421
create_authorization_line (const char *au, const char *user, const char *passwd, const char *method, const char *path, bool *finished, uerr_t *auth_err) { /* We are called only with known schemes, so we can dispatch on the first letter. */ switch (c_toupper...
null
0
create_authorization_line (const char *au, const char *user, const char *passwd, const char *method, const char *path, bool *finished, uerr_t *auth_err) { /* We are called only with known schemes, so we can dispatch on the first letter. */ switch (c_toupper...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,422
digest_authentication_encode (const char *au, const char *user, const char *passwd, const char *method, const char *path, uerr_t *auth_err) { static char *realm, *opaque, *nonce, *qop, *algorithm; static struct { const char *name; char **variable; ...
null
0
digest_authentication_encode (const char *au, const char *user, const char *passwd, const char *method, const char *path, uerr_t *auth_err) { static char *realm, *opaque, *nonce, *qop, *algorithm; static struct { const char *name; char **variable; ...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,423
dump_hash (char *buf, const unsigned char *hash) { int i; for (i = 0; i < MD5_DIGEST_SIZE; i++, hash++) { *buf++ = XNUM_TO_digit (*hash >> 4); *buf++ = XNUM_TO_digit (*hash & 0xf); } *buf = '\0'; }
null
0
dump_hash (char *buf, const unsigned char *hash) { int i; for (i = 0; i < MD5_DIGEST_SIZE; i++, hash++) { *buf++ = XNUM_TO_digit (*hash >> 4); *buf++ = XNUM_TO_digit (*hash & 0xf); } *buf = '\0'; }
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,424
ensure_extension (struct http_stat *hs, const char *ext, int *dt) { char *last_period_in_local_filename = strrchr (hs->local_file, '.'); char shortext[8]; int len; shortext[0] = '\0'; len = strlen (ext); if (len == 5) { memcpy (shortext, ext, len - 1); shortext[len - 1] = '\0'; } if (...
null
0
ensure_extension (struct http_stat *hs, const char *ext, int *dt) { char *last_period_in_local_filename = strrchr (hs->local_file, '.'); char shortext[8]; int len; shortext[0] = '\0'; len = strlen (ext); if (len == 5) { memcpy (shortext, ext, len - 1); shortext[len - 1] = '\0'; } if (...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,425
establish_connection (const struct url *u, const struct url **conn_ref, struct http_stat *hs, struct url *proxy, char **proxyauth, struct request **req_ref, bool *using_ssl, bool inhibit_keep_alive, int *sock_r...
null
0
establish_connection (const struct url *u, const struct url **conn_ref, struct http_stat *hs, struct url *proxy, char **proxyauth, struct request **req_ref, bool *using_ssl, bool inhibit_keep_alive, int *sock_r...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,426
get_file_flags (const char *filename, int *dt) { logprintf (LOG_VERBOSE, _("\ File %s already there; not retrieving.\n\n"), quote (filename)); /* If the file is there, we suppose it's retrieved OK. */ *dt |= RETROKF; /* #### Bogusness alert. */ /* If its suffix is "html" or "htm" or similar, assume text/ht...
null
0
get_file_flags (const char *filename, int *dt) { logprintf (LOG_VERBOSE, _("\ File %s already there; not retrieving.\n\n"), quote (filename)); /* If the file is there, we suppose it's retrieved OK. */ *dt |= RETROKF; /* #### Bogusness alert. */ /* If its suffix is "html" or "htm" or similar, assume text/ht...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,427
gethttp (const struct url *u, struct url *original_url, struct http_stat *hs, int *dt, struct url *proxy, struct iri *iri, int count) { struct request *req = NULL; char *type = NULL; char *user, *passwd; char *proxyauth; int statcode; int write_error; wgint contlen, contrange; const struct url...
null
0
gethttp (const struct url *u, struct url *original_url, struct http_stat *hs, int *dt, struct url *proxy, struct iri *iri, int count) { struct request *req = NULL; char *type = NULL; char *user, *passwd; char *proxyauth; int statcode; int write_error; wgint contlen, contrange; const struct url...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,428
http_atotm (const char *time_string) { /* NOTE: Solaris strptime man page claims that %n and %t match white space, but that's not universally available. Instead, we simply use ` ' to mean "skip all WS", which works under all strptime implementations I've tested. */ static const char *time_formats[...
null
0
http_atotm (const char *time_string) { /* NOTE: Solaris strptime man page claims that %n and %t match white space, but that's not universally available. Instead, we simply use ` ' to mean "skip all WS", which works under all strptime implementations I've tested. */ static const char *time_formats[...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,429
http_cleanup (void) { xfree (pconn.host); if (wget_cookie_jar) cookie_jar_delete (wget_cookie_jar); }
null
0
http_cleanup (void) { xfree (pconn.host); if (wget_cookie_jar) cookie_jar_delete (wget_cookie_jar); }
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,430
known_authentication_scheme_p (const char *hdrbeg, const char *hdrend) { return STARTS ("Basic", hdrbeg, hdrend) #ifdef ENABLE_DIGEST || STARTS ("Digest", hdrbeg, hdrend) #endif #ifdef ENABLE_NTLM || STARTS ("NTLM", hdrbeg, hdrend) #endif ; }
null
0
known_authentication_scheme_p (const char *hdrbeg, const char *hdrend) { return STARTS ("Basic", hdrbeg, hdrend) #ifdef ENABLE_DIGEST || STARTS ("Digest", hdrbeg, hdrend) #endif #ifdef ENABLE_NTLM || STARTS ("NTLM", hdrbeg, hdrend) #endif ; }
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,431
maybe_send_basic_creds (const char *hostname, const char *user, const char *passwd, struct request *req) { bool do_challenge = false; if (opt.auth_without_challenge) { DEBUGP (("Auth-without-challenge set, sending Basic credentials.\n")); do_challenge = true; } else if...
null
0
maybe_send_basic_creds (const char *hostname, const char *user, const char *passwd, struct request *req) { bool do_challenge = false; if (opt.auth_without_challenge) { DEBUGP (("Auth-without-challenge set, sending Basic credentials.\n")); do_challenge = true; } else if...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,432
metalink_from_http (const struct response *resp, const struct http_stat *hs, const struct url *u) { metalink_t *metalink = NULL; metalink_file_t *mfile = xnew0 (metalink_file_t); const char *val_beg, *val_end; int res_count = 0, meta_count = 0, hash_count = 0, sig_count = 0, i; DEBUGP (("...
null
0
metalink_from_http (const struct response *resp, const struct http_stat *hs, const struct url *u) { metalink_t *metalink = NULL; metalink_file_t *mfile = xnew0 (metalink_file_t); const char *val_beg, *val_end; int res_count = 0, meta_count = 0, hash_count = 0, sig_count = 0, i; DEBUGP (("...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,433
register_basic_auth_host (const char *hostname) { if (!basic_authed_hosts) { basic_authed_hosts = make_nocase_string_hash_table (1); } if (!hash_table_contains (basic_authed_hosts, hostname)) { hash_table_put (basic_authed_hosts, xstrdup (hostname), NULL); DEBUGP (("Inserted %s into ba...
null
0
register_basic_auth_host (const char *hostname) { if (!basic_authed_hosts) { basic_authed_hosts = make_nocase_string_hash_table (1); } if (!hash_table_contains (basic_authed_hosts, hostname)) { hash_table_put (basic_authed_hosts, xstrdup (hostname), NULL); DEBUGP (("Inserted %s into ba...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,434
release_header (struct request_header *hdr) { switch (hdr->release_policy) { case rel_none: break; case rel_name: xfree (hdr->name); break; case rel_value: xfree (hdr->value); break; case rel_both: xfree (hdr->name); xfree (hdr->value); break; } ...
null
0
release_header (struct request_header *hdr) { switch (hdr->release_policy) { case rel_none: break; case rel_name: xfree (hdr->name); break; case rel_value: xfree (hdr->value); break; case rel_both: xfree (hdr->name); xfree (hdr->value); break; } ...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,435
request_method (const struct request *req) { return req->method; }
null
0
request_method (const struct request *req) { return req->method; }
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,436
request_new (const char *method, char *arg) { struct request *req = xnew0 (struct request); req->hcapacity = 8; req->headers = xnew_array (struct request_header, req->hcapacity); req->method = method; req->arg = arg; return req; }
null
0
request_new (const char *method, char *arg) { struct request *req = xnew0 (struct request); req->hcapacity = 8; req->headers = xnew_array (struct request_header, req->hcapacity); req->method = method; req->arg = arg; return req; }
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,437
request_remove_header (struct request *req, const char *name) { int i; for (i = 0; i < req->hcount; i++) { struct request_header *hdr = &req->headers[i]; if (0 == c_strcasecmp (name, hdr->name)) { release_header (hdr); /* Move the remaining headers by one. */ if...
null
0
request_remove_header (struct request *req, const char *name) { int i; for (i = 0; i < req->hcount; i++) { struct request_header *hdr = &req->headers[i]; if (0 == c_strcasecmp (name, hdr->name)) { release_header (hdr); /* Move the remaining headers by one. */ if...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,438
request_send (const struct request *req, int fd, FILE *warc_tmp) { char *request_string, *p; int i, size, write_error; /* Count the request size. */ size = 0; /* METHOD " " ARG " " "HTTP/1.0" "\r\n" */ size += strlen (req->method) + 1 + strlen (req->arg) + 1 + 8 + 2; for (i = 0; i < req->hcount; i++) ...
null
0
request_send (const struct request *req, int fd, FILE *warc_tmp) { char *request_string, *p; int i, size, write_error; /* Count the request size. */ size = 0; /* METHOD " " ARG " " "HTTP/1.0" "\r\n" */ size += strlen (req->method) + 1 + strlen (req->arg) + 1 + 8 + 2; for (i = 0; i < req->hcount; i++) ...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,439
request_set_header (struct request *req, const char *name, const char *value, enum rp release_policy) { struct request_header *hdr; int i; if (!value) { /* A NULL value is a no-op; if freeing the name is requested, free it now to avoid leaks. */ if (release_policy ==...
null
0
request_set_header (struct request *req, const char *name, const char *value, enum rp release_policy) { struct request_header *hdr; int i; if (!value) { /* A NULL value is a no-op; if freeing the name is requested, free it now to avoid leaks. */ if (release_policy ==...
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,440
request_set_user_header (struct request *req, const char *header) { char *name; const char *p = strchr (header, ':'); if (!p) return; BOUNDED_TO_ALLOCA (header, p, name); ++p; while (c_isspace (*p)) ++p; request_set_header (req, xstrdup (name), (char *) p, rel_name); }
null
0
request_set_user_header (struct request *req, const char *header) { char *name; const char *p = strchr (header, ':'); if (!p) return; BOUNDED_TO_ALLOCA (header, p, name); ++p; while (c_isspace (*p)) ++p; request_set_header (req, xstrdup (name), (char *) p, rel_name); }
@@ -613,9 +613,9 @@ struct response { resp_header_*. */ static struct response * -resp_new (const char *head) +resp_new (char *head) { - const char *hdr; + char *hdr; int count, size; struct response *resp = xnew0 (struct response); @@ -644,15 +644,23 @@ resp_new (const char *head) break; ...
CWE-20
null
null
12,441
static NOINLINE void attach_option( struct option_set **opt_list, const struct dhcp_optflag *optflag, char *buffer, int length) { struct option_set *existing; char *allocated; allocated = allocate_tempopt_if_needed(optflag, buffer, &length); #if ENABLE_FEATURE_UDHCP_RFC3397 if ((optflag->flags & OPTION_TYP...
Overflow
0
static NOINLINE void attach_option( struct option_set **opt_list, const struct dhcp_optflag *optflag, char *buffer, int length) { struct option_set *existing; char *allocated; allocated = allocate_tempopt_if_needed(optflag, buffer, &length); #if ENABLE_FEATURE_UDHCP_RFC3397 if ((optflag->flags & OPTION_TYP...
@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1 = * udhcp_str2optset: to determine how many bytes to allocate. * xmalloc_optname_optval: to estimate string length * from binary option length: (option[LEN] / dhcp_option_lengths[opt_type]) - * is the number of elements, multiply in by one element's stri...
CWE-119
null
null
12,442
void FAST_FUNC udhcp_add_binary_option(struct dhcp_packet *packet, uint8_t *addopt) { unsigned len; uint8_t *optionptr = packet->options; unsigned end = udhcp_end_option(optionptr); len = OPT_DATA + addopt[OPT_LEN]; /* end position + (option code/length + addopt length) + end option */ if (end + len + 1 >= DHCP_...
Overflow
0
void FAST_FUNC udhcp_add_binary_option(struct dhcp_packet *packet, uint8_t *addopt) { unsigned len; uint8_t *optionptr = packet->options; unsigned end = udhcp_end_option(optionptr); len = OPT_DATA + addopt[OPT_LEN]; /* end position + (option code/length + addopt length) + end option */ if (end + len + 1 >= DHCP_...
@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1 = * udhcp_str2optset: to determine how many bytes to allocate. * xmalloc_optname_optval: to estimate string length * from binary option length: (option[LEN] / dhcp_option_lengths[opt_type]) - * is the number of elements, multiply in by one element's stri...
CWE-119
null
null
12,443
uint8_t* FAST_FUNC udhcp_get_option(struct dhcp_packet *packet, int code) { uint8_t *optionptr; int len; int rem; int overload = 0; enum { FILE_FIELD101 = FILE_FIELD * 0x101, SNAME_FIELD101 = SNAME_FIELD * 0x101, }; /* option bytes: [code][len][data1][data2]..[dataLEN] */ optionptr = packet->options; re...
Overflow
0
uint8_t* FAST_FUNC udhcp_get_option(struct dhcp_packet *packet, int code) { uint8_t *optionptr; int len; int rem; int overload = 0; enum { FILE_FIELD101 = FILE_FIELD * 0x101, SNAME_FIELD101 = SNAME_FIELD * 0x101, }; /* option bytes: [code][len][data1][data2]..[dataLEN] */ optionptr = packet->options; re...
@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1 = * udhcp_str2optset: to determine how many bytes to allocate. * xmalloc_optname_optval: to estimate string length * from binary option length: (option[LEN] / dhcp_option_lengths[opt_type]) - * is the number of elements, multiply in by one element's stri...
CWE-119
null
null
12,444
unsigned FAST_FUNC udhcp_option_idx(const char *name) { int n = index_in_strings(dhcp_option_strings, name); if (n >= 0) return n; { char buf[sizeof(dhcp_option_strings)]; char *d = buf; const char *s = dhcp_option_strings; while (s < dhcp_option_strings + sizeof(dhcp_option_strings) - 2) { *d++ = (*s ...
Overflow
0
unsigned FAST_FUNC udhcp_option_idx(const char *name) { int n = index_in_strings(dhcp_option_strings, name); if (n >= 0) return n; { char buf[sizeof(dhcp_option_strings)]; char *d = buf; const char *s = dhcp_option_strings; while (s < dhcp_option_strings + sizeof(dhcp_option_strings) - 2) { *d++ = (*s ...
@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1 = * udhcp_str2optset: to determine how many bytes to allocate. * xmalloc_optname_optval: to estimate string length * from binary option length: (option[LEN] / dhcp_option_lengths[opt_type]) - * is the number of elements, multiply in by one element's stri...
CWE-119
null
null
12,445
int FAST_FUNC udhcp_str2optset(const char *const_str, void *arg) { struct option_set **opt_list = arg; char *opt, *val; char *str; const struct dhcp_optflag *optflag; struct dhcp_optflag bin_optflag; unsigned optcode; int retval, length; /* IP_PAIR needs 8 bytes, STATIC_ROUTES needs 9 max */ char buffer[9] ALI...
Overflow
0
int FAST_FUNC udhcp_str2optset(const char *const_str, void *arg) { struct option_set **opt_list = arg; char *opt, *val; char *str; const struct dhcp_optflag *optflag; struct dhcp_optflag bin_optflag; unsigned optcode; int retval, length; /* IP_PAIR needs 8 bytes, STATIC_ROUTES needs 9 max */ char buffer[9] ALI...
@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1 = * udhcp_str2optset: to determine how many bytes to allocate. * xmalloc_optname_optval: to estimate string length * from binary option length: (option[LEN] / dhcp_option_lengths[opt_type]) - * is the number of elements, multiply in by one element's stri...
CWE-119
null
null
12,446
static int bcast_or_ucast(struct dhcp_packet *packet, uint32_t ciaddr, uint32_t server) { if (server) return udhcp_send_kernel_packet(packet, ciaddr, CLIENT_PORT, server, SERVER_PORT); return raw_bcast_from_client_config_ifindex(packet); }
Overflow
0
static int bcast_or_ucast(struct dhcp_packet *packet, uint32_t ciaddr, uint32_t server) { if (server) return udhcp_send_kernel_packet(packet, ciaddr, CLIENT_PORT, server, SERVER_PORT); return raw_bcast_from_client_config_ifindex(packet); }
@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = { [OPTION_IP ] = sizeof("255.255.255.255 "), [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), - [OPTION_6RD ] = sizeof("32 128 ffff:ff...
CWE-119
null
null
12,447
static void change_listen_mode(int new_mode) { log1("Entering listen mode: %s", new_mode != LISTEN_NONE ? (new_mode == LISTEN_KERNEL ? "kernel" : "raw") : "none" ); listen_mode = new_mode; if (sockfd >= 0) { close(sockfd); sockfd = -1; } if (new_mode == LISTEN_KERNEL) sockfd = udhcp_listen_socket(/...
Overflow
0
static void change_listen_mode(int new_mode) { log1("Entering listen mode: %s", new_mode != LISTEN_NONE ? (new_mode == LISTEN_KERNEL ? "kernel" : "raw") : "none" ); listen_mode = new_mode; if (sockfd >= 0) { close(sockfd); sockfd = -1; } if (new_mode == LISTEN_KERNEL) sockfd = udhcp_listen_socket(/...
@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = { [OPTION_IP ] = sizeof("255.255.255.255 "), [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), - [OPTION_6RD ] = sizeof("32 128 ffff:ff...
CWE-119
null
null
12,448
static char **fill_envp(struct dhcp_packet *packet) { int envc; int i; char **envp, **curr; const char *opt_name; uint8_t *temp; uint8_t overload = 0; #define BITMAP unsigned #define BBITS (sizeof(BITMAP) * 8) #define BMASK(i) (1 << (i & (sizeof(BITMAP) * 8 - 1))) #define FOUND_OPTS(i) (found_opts[(unsigned)i / ...
Overflow
0
static char **fill_envp(struct dhcp_packet *packet) { int envc; int i; char **envp, **curr; const char *opt_name; uint8_t *temp; uint8_t overload = 0; #define BITMAP unsigned #define BBITS (sizeof(BITMAP) * 8) #define BMASK(i) (1 << (i & (sizeof(BITMAP) * 8 - 1))) #define FOUND_OPTS(i) (found_opts[(unsigned)i / ...
@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = { [OPTION_IP ] = sizeof("255.255.255.255 "), [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), - [OPTION_6RD ] = sizeof("32 128 ffff:ff...
CWE-119
null
null
12,449
static void perform_release(uint32_t server_addr, uint32_t requested_ip) { char buffer[sizeof("255.255.255.255")]; struct in_addr temp_addr; /* send release packet */ if (state == BOUND || state == RENEWING || state == REBINDING) { temp_addr.s_addr = server_addr; strcpy(buffer, inet_ntoa(temp_addr)); temp_ad...
Overflow
0
static void perform_release(uint32_t server_addr, uint32_t requested_ip) { char buffer[sizeof("255.255.255.255")]; struct in_addr temp_addr; /* send release packet */ if (state == BOUND || state == RENEWING || state == REBINDING) { temp_addr.s_addr = server_addr; strcpy(buffer, inet_ntoa(temp_addr)); temp_ad...
@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = { [OPTION_IP ] = sizeof("255.255.255.255 "), [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), - [OPTION_6RD ] = sizeof("32 128 ffff:ff...
CWE-119
null
null
12,450
static void perform_renew(void) { bb_info_msg("Performing a DHCP renew"); switch (state) { case BOUND: change_listen_mode(LISTEN_KERNEL); case RENEWING: case REBINDING: state = RENEW_REQUESTED; break; case RENEW_REQUESTED: /* impatient are we? fine, square 1 */ udhcp_run_script(NULL, "deconfig"); case RE...
Overflow
0
static void perform_renew(void) { bb_info_msg("Performing a DHCP renew"); switch (state) { case BOUND: change_listen_mode(LISTEN_KERNEL); case RENEWING: case REBINDING: state = RENEW_REQUESTED; break; case RENEW_REQUESTED: /* impatient are we? fine, square 1 */ udhcp_run_script(NULL, "deconfig"); case RE...
@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = { [OPTION_IP ] = sizeof("255.255.255.255 "), [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), - [OPTION_6RD ] = sizeof("32 128 ffff:ff...
CWE-119
null
null
12,451
static int raw_bcast_from_client_config_ifindex(struct dhcp_packet *packet) { return udhcp_send_raw_packet(packet, /*src*/ INADDR_ANY, CLIENT_PORT, /*dst*/ INADDR_BROADCAST, SERVER_PORT, MAC_BCAST_ADDR, client_config.ifindex); }
Overflow
0
static int raw_bcast_from_client_config_ifindex(struct dhcp_packet *packet) { return udhcp_send_raw_packet(packet, /*src*/ INADDR_ANY, CLIENT_PORT, /*dst*/ INADDR_BROADCAST, SERVER_PORT, MAC_BCAST_ADDR, client_config.ifindex); }
@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = { [OPTION_IP ] = sizeof("255.255.255.255 "), [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), - [OPTION_6RD ] = sizeof("32 128 ffff:ff...
CWE-119
null
null
12,452
static NOINLINE int send_decline(/*uint32_t xid,*/ uint32_t server, uint32_t requested) { struct dhcp_packet packet; /* Fill in: op, htype, hlen, cookie, chaddr, random xid fields, * client-id option (unless -C), message type option: */ init_packet(&packet, DHCPDECLINE); #if 0 /* RFC 2131 says DHCPDECLINE's x...
Overflow
0
static NOINLINE int send_decline(/*uint32_t xid,*/ uint32_t server, uint32_t requested) { struct dhcp_packet packet; /* Fill in: op, htype, hlen, cookie, chaddr, random xid fields, * client-id option (unless -C), message type option: */ init_packet(&packet, DHCPDECLINE); #if 0 /* RFC 2131 says DHCPDECLINE's x...
@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = { [OPTION_IP ] = sizeof("255.255.255.255 "), [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), - [OPTION_6RD ] = sizeof("32 128 ffff:ff...
CWE-119
null
null
12,453
static NOINLINE int send_discover(uint32_t xid, uint32_t requested) { struct dhcp_packet packet; /* Fill in: op, htype, hlen, cookie, chaddr fields, * random xid field (we override it below), * client-id option (unless -C), message type option: */ init_packet(&packet, DHCPDISCOVER); packet.xid = xid; if (r...
Overflow
0
static NOINLINE int send_discover(uint32_t xid, uint32_t requested) { struct dhcp_packet packet; /* Fill in: op, htype, hlen, cookie, chaddr fields, * random xid field (we override it below), * client-id option (unless -C), message type option: */ init_packet(&packet, DHCPDISCOVER); packet.xid = xid; if (r...
@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = { [OPTION_IP ] = sizeof("255.255.255.255 "), [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), - [OPTION_6RD ] = sizeof("32 128 ffff:ff...
CWE-119
null
null
12,454
static int send_release(uint32_t server, uint32_t ciaddr) { struct dhcp_packet packet; /* Fill in: op, htype, hlen, cookie, chaddr, random xid fields, * client-id option (unless -C), message type option: */ init_packet(&packet, DHCPRELEASE); /* DHCPRELEASE uses ciaddr, not "requested ip", to store IP being re...
Overflow
0
static int send_release(uint32_t server, uint32_t ciaddr) { struct dhcp_packet packet; /* Fill in: op, htype, hlen, cookie, chaddr, random xid fields, * client-id option (unless -C), message type option: */ init_packet(&packet, DHCPRELEASE); /* DHCPRELEASE uses ciaddr, not "requested ip", to store IP being re...
@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = { [OPTION_IP ] = sizeof("255.255.255.255 "), [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), - [OPTION_6RD ] = sizeof("32 128 ffff:ff...
CWE-119
null
null
12,455
static NOINLINE int send_select(uint32_t xid, uint32_t server, uint32_t requested) { struct dhcp_packet packet; struct in_addr addr; /* * RFC 2131 4.3.2 DHCPREQUEST message * ... * If the DHCPREQUEST message contains a 'server identifier' * option, the message is in response to a DHCPOFFER message. * Otherwise,...
Overflow
0
static NOINLINE int send_select(uint32_t xid, uint32_t server, uint32_t requested) { struct dhcp_packet packet; struct in_addr addr; /* * RFC 2131 4.3.2 DHCPREQUEST message * ... * If the DHCPREQUEST message contains a 'server identifier' * option, the message is in response to a DHCPOFFER message. * Otherwise,...
@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = { [OPTION_IP ] = sizeof("255.255.255.255 "), [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), - [OPTION_6RD ] = sizeof("32 128 ffff:ff...
CWE-119
null
null
12,456
static int udhcp_raw_socket(int ifindex) { int fd; struct sockaddr_ll sock; log1("Opening raw socket on ifindex %d", ifindex); //log2? fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); /* ^^^^^ * SOCK_DGRAM: remove link-layer headers on input (SOCK_RAW keeps them) * ETH_P_IP: want to receive only packets...
Overflow
0
static int udhcp_raw_socket(int ifindex) { int fd; struct sockaddr_ll sock; log1("Opening raw socket on ifindex %d", ifindex); //log2? fd = xsocket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); /* ^^^^^ * SOCK_DGRAM: remove link-layer headers on input (SOCK_RAW keeps them) * ETH_P_IP: want to receive only packets...
@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = { [OPTION_IP ] = sizeof("255.255.255.255 "), [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), - [OPTION_6RD ] = sizeof("32 128 ffff:ff...
CWE-119
null
null
12,457
static const char *valid_domain_label(const char *label) { unsigned char ch; unsigned pos = 0; for (;;) { ch = *label; if ((ch|0x20) < 'a' || (ch|0x20) > 'z') { if (ch < '0' || ch > '9') { if (ch == '\0' || ch == '.') return label; /* DNS allows only '-', but we are more permissive */ if (ch...
Overflow
0
static const char *valid_domain_label(const char *label) { unsigned char ch; unsigned pos = 0; for (;;) { ch = *label; if ((ch|0x20) < 'a' || (ch|0x20) > 'z') { if (ch < '0' || ch > '9') { if (ch == '\0' || ch == '.') return label; /* DNS allows only '-', but we are more permissive */ if (ch...
@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = { [OPTION_IP ] = sizeof("255.255.255.255 "), [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), - [OPTION_6RD ] = sizeof("32 128 ffff:ff...
CWE-119
null
null
12,458
compare_forward(struct Forward *a, struct Forward *b) { if (!compare_host(a->listen_host, b->listen_host)) return 0; if (!compare_host(a->listen_path, b->listen_path)) return 0; if (a->listen_port != b->listen_port) return 0; if (!compare_host(a->connect_host, b->connect_host)) return 0; if (!compare_host(...
null
0
compare_forward(struct Forward *a, struct Forward *b) { if (!compare_host(a->listen_host, b->listen_host)) return 0; if (!compare_host(a->listen_path, b->listen_path)) return 0; if (a->listen_port != b->listen_port) return 0; if (!compare_host(a->connect_host, b->connect_host)) return 0; if (!compare_host(...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,459
control_client_sighandler(int signo) { muxclient_terminate = signo; }
null
0
control_client_sighandler(int signo) { muxclient_terminate = signo; }
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,460
control_client_sigrelay(int signo) { int save_errno = errno; if (muxserver_pid > 1) kill(muxserver_pid, signo); errno = save_errno; }
null
0
control_client_sigrelay(int signo) { int save_errno = errno; if (muxserver_pid > 1) kill(muxserver_pid, signo); errno = save_errno; }
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,461
env_permitted(char *env) { int i, ret; char name[1024], *cp; if ((cp = strchr(env, '=')) == NULL || cp == env) return 0; ret = snprintf(name, sizeof(name), "%.*s", (int)(cp - env), env); if (ret <= 0 || (size_t)ret >= sizeof(name)) { error("env_permitted: name '%.100s...' too long", env); return 0; } for...
null
0
env_permitted(char *env) { int i, ret; char name[1024], *cp; if ((cp = strchr(env, '=')) == NULL || cp == env) return 0; ret = snprintf(name, sizeof(name), "%.*s", (int)(cp - env), env); if (ret <= 0 || (size_t)ret >= sizeof(name)) { error("env_permitted: name '%.100s...' too long", env); return 0; } for...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,462
format_forward(u_int ftype, struct Forward *fwd) { char *ret; switch (ftype) { case MUX_FWD_LOCAL: xasprintf(&ret, "local forward %.200s:%d -> %.200s:%d", (fwd->listen_path != NULL) ? fwd->listen_path : (fwd->listen_host == NULL) ? (options.fwd_opts.gateway_ports ? "*" : "LOCALHOST") : fwd...
null
0
format_forward(u_int ftype, struct Forward *fwd) { char *ret; switch (ftype) { case MUX_FWD_LOCAL: xasprintf(&ret, "local forward %.200s:%d -> %.200s:%d", (fwd->listen_path != NULL) ? fwd->listen_path : (fwd->listen_host == NULL) ? (options.fwd_opts.gateway_ports ? "*" : "LOCALHOST") : fwd...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,463
mux_client_forward(int fd, int cancel_flag, u_int ftype, struct Forward *fwd) { Buffer m; char *e, *fwd_desc; u_int type, rid; fwd_desc = format_forward(ftype, fwd); debug("Requesting %s %s", cancel_flag ? "cancellation of" : "forwarding of", fwd_desc); free(fwd_desc); buffer_init(&m); buffer_put_int(&m,...
null
0
mux_client_forward(int fd, int cancel_flag, u_int ftype, struct Forward *fwd) { Buffer m; char *e, *fwd_desc; u_int type, rid; fwd_desc = format_forward(ftype, fwd); debug("Requesting %s %s", cancel_flag ? "cancellation of" : "forwarding of", fwd_desc); free(fwd_desc); buffer_init(&m); buffer_put_int(&m,...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,464
mux_client_forwards(int fd, int cancel_flag) { int i, ret = 0; debug3("%s: %s forwardings: %d local, %d remote", __func__, cancel_flag ? "cancel" : "request", options.num_local_forwards, options.num_remote_forwards); /* XXX ExitOnForwardingFailure */ for (i = 0; i < options.num_local_forwards; i++) { ...
null
0
mux_client_forwards(int fd, int cancel_flag) { int i, ret = 0; debug3("%s: %s forwardings: %d local, %d remote", __func__, cancel_flag ? "cancel" : "request", options.num_local_forwards, options.num_remote_forwards); /* XXX ExitOnForwardingFailure */ for (i = 0; i < options.num_local_forwards; i++) { ...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,465
mux_client_hello_exchange(int fd) { Buffer m; u_int type, ver; buffer_init(&m); buffer_put_int(&m, MUX_MSG_HELLO); buffer_put_int(&m, SSHMUX_VER); /* no extensions */ if (mux_client_write_packet(fd, &m) != 0) fatal("%s: write packet: %s", __func__, strerror(errno)); buffer_clear(&m); /* Read their HELLO ...
null
0
mux_client_hello_exchange(int fd) { Buffer m; u_int type, ver; buffer_init(&m); buffer_put_int(&m, MUX_MSG_HELLO); buffer_put_int(&m, SSHMUX_VER); /* no extensions */ if (mux_client_write_packet(fd, &m) != 0) fatal("%s: write packet: %s", __func__, strerror(errno)); buffer_clear(&m); /* Read their HELLO ...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,466
mux_client_read_packet(int fd, Buffer *m) { Buffer queue; u_int need, have; const u_char *ptr; int oerrno; buffer_init(&queue); if (mux_client_read(fd, &queue, 4) != 0) { if ((oerrno = errno) == EPIPE) debug3("%s: read header failed: %s", __func__, strerror(errno)); buffer_free(&queue); errno = o...
null
0
mux_client_read_packet(int fd, Buffer *m) { Buffer queue; u_int need, have; const u_char *ptr; int oerrno; buffer_init(&queue); if (mux_client_read(fd, &queue, 4) != 0) { if ((oerrno = errno) == EPIPE) debug3("%s: read header failed: %s", __func__, strerror(errno)); buffer_free(&queue); errno = o...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,467
mux_client_request_alive(int fd) { Buffer m; char *e; u_int pid, type, rid; debug3("%s: entering", __func__); buffer_init(&m); buffer_put_int(&m, MUX_C_ALIVE_CHECK); buffer_put_int(&m, muxclient_request_id); if (mux_client_write_packet(fd, &m) != 0) fatal("%s: write packet: %s", __func__, strerror(errno));...
null
0
mux_client_request_alive(int fd) { Buffer m; char *e; u_int pid, type, rid; debug3("%s: entering", __func__); buffer_init(&m); buffer_put_int(&m, MUX_C_ALIVE_CHECK); buffer_put_int(&m, muxclient_request_id); if (mux_client_write_packet(fd, &m) != 0) fatal("%s: write packet: %s", __func__, strerror(errno));...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,468
mux_client_request_session(int fd) { Buffer m; char *e, *term; u_int i, rid, sid, esid, exitval, type, exitval_seen; extern char **environ; int devnull, rawmode; debug3("%s: entering", __func__); if ((muxserver_pid = mux_client_request_alive(fd)) == 0) { error("%s: master alive request failed", __func__); ...
null
0
mux_client_request_session(int fd) { Buffer m; char *e, *term; u_int i, rid, sid, esid, exitval, type, exitval_seen; extern char **environ; int devnull, rawmode; debug3("%s: entering", __func__); if ((muxserver_pid = mux_client_request_alive(fd)) == 0) { error("%s: master alive request failed", __func__); ...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,469
mux_client_request_stdio_fwd(int fd) { Buffer m; char *e; u_int type, rid, sid; int devnull; debug3("%s: entering", __func__); if ((muxserver_pid = mux_client_request_alive(fd)) == 0) { error("%s: master alive request failed", __func__); return -1; } signal(SIGPIPE, SIG_IGN); if (stdin_null_flag) { i...
null
0
mux_client_request_stdio_fwd(int fd) { Buffer m; char *e; u_int type, rid, sid; int devnull; debug3("%s: entering", __func__); if ((muxserver_pid = mux_client_request_alive(fd)) == 0) { error("%s: master alive request failed", __func__); return -1; } signal(SIGPIPE, SIG_IGN); if (stdin_null_flag) { i...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,470
mux_client_request_stop_listening(int fd) { Buffer m; char *e; u_int type, rid; debug3("%s: entering", __func__); buffer_init(&m); buffer_put_int(&m, MUX_C_STOP_LISTENING); buffer_put_int(&m, muxclient_request_id); if (mux_client_write_packet(fd, &m) != 0) fatal("%s: write packet: %s", __func__, strerror(e...
null
0
mux_client_request_stop_listening(int fd) { Buffer m; char *e; u_int type, rid; debug3("%s: entering", __func__); buffer_init(&m); buffer_put_int(&m, MUX_C_STOP_LISTENING); buffer_put_int(&m, muxclient_request_id); if (mux_client_write_packet(fd, &m) != 0) fatal("%s: write packet: %s", __func__, strerror(e...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,471
mux_client_write_packet(int fd, Buffer *m) { Buffer queue; u_int have, need; int oerrno, len; u_char *ptr; struct pollfd pfd; pfd.fd = fd; pfd.events = POLLOUT; buffer_init(&queue); buffer_put_string(&queue, buffer_ptr(m), buffer_len(m)); need = buffer_len(&queue); ptr = buffer_ptr(&queue); for (have = 0...
null
0
mux_client_write_packet(int fd, Buffer *m) { Buffer queue; u_int have, need; int oerrno, len; u_char *ptr; struct pollfd pfd; pfd.fd = fd; pfd.events = POLLOUT; buffer_init(&queue); buffer_put_string(&queue, buffer_ptr(m), buffer_len(m)); need = buffer_len(&queue); ptr = buffer_ptr(&queue); for (have = 0...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,472
mux_confirm_remote_forward(int type, u_int32_t seq, void *ctxt) { struct mux_channel_confirm_ctx *fctx = ctxt; char *failmsg = NULL; struct Forward *rfwd; Channel *c; Buffer out; if ((c = channel_by_id(fctx->cid)) == NULL) { /* no channel for reply */ error("%s: unknown channel", __func__); return; } buf...
null
0
mux_confirm_remote_forward(int type, u_int32_t seq, void *ctxt) { struct mux_channel_confirm_ctx *fctx = ctxt; char *failmsg = NULL; struct Forward *rfwd; Channel *c; Buffer out; if ((c = channel_by_id(fctx->cid)) == NULL) { /* no channel for reply */ error("%s: unknown channel", __func__); return; } buf...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,473
mux_exit_message(Channel *c, int exitval) { Buffer m; Channel *mux_chan; debug3("%s: channel %d: exit message, exitval %d", __func__, c->self, exitval); if ((mux_chan = channel_by_id(c->ctl_chan)) == NULL) fatal("%s: channel %d missing mux channel %d", __func__, c->self, c->ctl_chan); /* Append exi...
null
0
mux_exit_message(Channel *c, int exitval) { Buffer m; Channel *mux_chan; debug3("%s: channel %d: exit message, exitval %d", __func__, c->self, exitval); if ((mux_chan = channel_by_id(c->ctl_chan)) == NULL) fatal("%s: channel %d missing mux channel %d", __func__, c->self, c->ctl_chan); /* Append exi...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,474
mux_master_control_cleanup_cb(int cid, void *unused) { Channel *sc, *c = channel_by_id(cid); debug3("%s: entering for channel %d", __func__, cid); if (c == NULL) fatal("%s: channel_by_id(%i) == NULL", __func__, cid); if (c->remote_id != -1) { if ((sc = channel_by_id(c->remote_id)) == NULL) fatal("%s: channe...
null
0
mux_master_control_cleanup_cb(int cid, void *unused) { Channel *sc, *c = channel_by_id(cid); debug3("%s: entering for channel %d", __func__, cid); if (c == NULL) fatal("%s: channel_by_id(%i) == NULL", __func__, cid); if (c->remote_id != -1) { if ((sc = channel_by_id(c->remote_id)) == NULL) fatal("%s: channe...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,475
mux_master_read_cb(Channel *c) { struct mux_master_state *state = (struct mux_master_state *)c->mux_ctx; Buffer in, out; const u_char *ptr; u_int type, rid, have, i; int ret = -1; /* Setup ctx and */ if (c->mux_ctx == NULL) { state = xcalloc(1, sizeof(*state)); c->mux_ctx = state; channel_register_cleanu...
null
0
mux_master_read_cb(Channel *c) { struct mux_master_state *state = (struct mux_master_state *)c->mux_ctx; Buffer in, out; const u_char *ptr; u_int type, rid, have, i; int ret = -1; /* Setup ctx and */ if (c->mux_ctx == NULL) { state = xcalloc(1, sizeof(*state)); c->mux_ctx = state; channel_register_cleanu...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,476
mux_master_session_cleanup_cb(int cid, void *unused) { Channel *cc, *c = channel_by_id(cid); debug3("%s: entering for channel %d", __func__, cid); if (c == NULL) fatal("%s: channel_by_id(%i) == NULL", __func__, cid); if (c->ctl_chan != -1) { if ((cc = channel_by_id(c->ctl_chan)) == NULL) fatal("%s: channel ...
null
0
mux_master_session_cleanup_cb(int cid, void *unused) { Channel *cc, *c = channel_by_id(cid); debug3("%s: entering for channel %d", __func__, cid); if (c == NULL) fatal("%s: channel_by_id(%i) == NULL", __func__, cid); if (c->ctl_chan != -1) { if ((cc = channel_by_id(c->ctl_chan)) == NULL) fatal("%s: channel ...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,477
mux_stdio_confirm(int id, int success, void *arg) { struct mux_stdio_confirm_ctx *cctx = arg; Channel *c, *cc; Buffer reply; if (cctx == NULL) fatal("%s: cctx == NULL", __func__); if ((c = channel_by_id(id)) == NULL) fatal("%s: no channel for id %d", __func__, id); if ((cc = channel_by_id(c->ctl_chan)) == NU...
null
0
mux_stdio_confirm(int id, int success, void *arg) { struct mux_stdio_confirm_ctx *cctx = arg; Channel *c, *cc; Buffer reply; if (cctx == NULL) fatal("%s: cctx == NULL", __func__); if ((c = channel_by_id(id)) == NULL) fatal("%s: no channel for id %d", __func__, id); if ((cc = channel_by_id(c->ctl_chan)) == NU...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,478
mux_tty_alloc_failed(Channel *c) { Buffer m; Channel *mux_chan; debug3("%s: channel %d: TTY alloc failed", __func__, c->self); if ((mux_chan = channel_by_id(c->ctl_chan)) == NULL) fatal("%s: channel %d missing mux channel %d", __func__, c->self, c->ctl_chan); /* Append exit message packet to control soc...
null
0
mux_tty_alloc_failed(Channel *c) { Buffer m; Channel *mux_chan; debug3("%s: channel %d: TTY alloc failed", __func__, c->self); if ((mux_chan = channel_by_id(c->ctl_chan)) == NULL) fatal("%s: channel %d missing mux channel %d", __func__, c->self, c->ctl_chan); /* Append exit message packet to control soc...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,479
muxclient(const char *path) { struct sockaddr_un addr; socklen_t sun_len; int sock; u_int pid; if (muxclient_command == 0) { if (stdio_forward_host != NULL) muxclient_command = SSHMUX_COMMAND_STDIO_FWD; else muxclient_command = SSHMUX_COMMAND_OPEN; } switch (options.control_master) { case SSHCTL_MAS...
null
0
muxclient(const char *path) { struct sockaddr_un addr; socklen_t sun_len; int sock; u_int pid; if (muxclient_command == 0) { if (stdio_forward_host != NULL) muxclient_command = SSHMUX_COMMAND_STDIO_FWD; else muxclient_command = SSHMUX_COMMAND_OPEN; } switch (options.control_master) { case SSHCTL_MAS...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,480
muxserver_listen(void) { mode_t old_umask; char *orig_control_path = options.control_path; char rbuf[16+1]; u_int i, r; int oerrno; if (options.control_path == NULL || options.control_master == SSHCTL_MASTER_NO) return; debug("setting up multiplex master socket"); /* * Use a temporary path before li...
null
0
muxserver_listen(void) { mode_t old_umask; char *orig_control_path = options.control_path; char rbuf[16+1]; u_int i, r; int oerrno; if (options.control_path == NULL || options.control_master == SSHCTL_MASTER_NO) return; debug("setting up multiplex master socket"); /* * Use a temporary path before li...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,481
process_mux_alive_check(u_int rid, Channel *c, Buffer *m, Buffer *r) { debug2("%s: channel %d: alive check", __func__, c->self); /* prepare reply */ buffer_put_int(r, MUX_S_ALIVE); buffer_put_int(r, rid); buffer_put_int(r, (u_int)getpid()); return 0; }
null
0
process_mux_alive_check(u_int rid, Channel *c, Buffer *m, Buffer *r) { debug2("%s: channel %d: alive check", __func__, c->self); /* prepare reply */ buffer_put_int(r, MUX_S_ALIVE); buffer_put_int(r, rid); buffer_put_int(r, (u_int)getpid()); return 0; }
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,482
process_mux_close_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r) { struct Forward fwd, *found_fwd; char *fwd_desc = NULL; const char *error_reason = NULL; char *listen_addr = NULL, *connect_addr = NULL; u_int ftype; int i, ret = 0; u_int lport, cport; memset(&fwd, 0, sizeof(fwd)); if (buffer_get_int_ret(&f...
null
0
process_mux_close_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r) { struct Forward fwd, *found_fwd; char *fwd_desc = NULL; const char *error_reason = NULL; char *listen_addr = NULL, *connect_addr = NULL; u_int ftype; int i, ret = 0; u_int lport, cport; memset(&fwd, 0, sizeof(fwd)); if (buffer_get_int_ret(&f...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,483
process_mux_master_hello(u_int rid, Channel *c, Buffer *m, Buffer *r) { u_int ver; struct mux_master_state *state = (struct mux_master_state *)c->mux_ctx; if (state == NULL) fatal("%s: channel %d: c->mux_ctx == NULL", __func__, c->self); if (state->hello_rcvd) { error("%s: HELLO received twice", __func__); r...
null
0
process_mux_master_hello(u_int rid, Channel *c, Buffer *m, Buffer *r) { u_int ver; struct mux_master_state *state = (struct mux_master_state *)c->mux_ctx; if (state == NULL) fatal("%s: channel %d: c->mux_ctx == NULL", __func__, c->self); if (state->hello_rcvd) { error("%s: HELLO received twice", __func__); r...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,484
process_mux_new_session(u_int rid, Channel *c, Buffer *m, Buffer *r) { Channel *nc; struct mux_session_confirm_ctx *cctx; char *reserved, *cmd, *cp; u_int i, j, len, env_len, escape_char, window, packetmax; int new_fd[3]; /* Reply for SSHMUX_COMMAND_OPEN */ cctx = xcalloc(1, sizeof(*cctx)); cctx->term = NULL; ...
null
0
process_mux_new_session(u_int rid, Channel *c, Buffer *m, Buffer *r) { Channel *nc; struct mux_session_confirm_ctx *cctx; char *reserved, *cmd, *cp; u_int i, j, len, env_len, escape_char, window, packetmax; int new_fd[3]; /* Reply for SSHMUX_COMMAND_OPEN */ cctx = xcalloc(1, sizeof(*cctx)); cctx->term = NULL; ...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,485
process_mux_open_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r) { struct Forward fwd; char *fwd_desc = NULL; char *listen_addr, *connect_addr; u_int ftype; u_int lport, cport; int i, ret = 0, freefwd = 1; memset(&fwd, 0, sizeof(fwd)); /* XXX - lport/cport check redundant */ if (buffer_get_int_ret(&ftype, m...
null
0
process_mux_open_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r) { struct Forward fwd; char *fwd_desc = NULL; char *listen_addr, *connect_addr; u_int ftype; u_int lport, cport; int i, ret = 0, freefwd = 1; memset(&fwd, 0, sizeof(fwd)); /* XXX - lport/cport check redundant */ if (buffer_get_int_ret(&ftype, m...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,486
process_mux_stdio_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r) { Channel *nc; char *reserved, *chost; u_int cport, i, j; int new_fd[2]; struct mux_stdio_confirm_ctx *cctx; chost = reserved = NULL; if ((reserved = buffer_get_string_ret(m, NULL)) == NULL || (chost = buffer_get_string_ret(m, NULL)) == NULL...
null
0
process_mux_stdio_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r) { Channel *nc; char *reserved, *chost; u_int cport, i, j; int new_fd[2]; struct mux_stdio_confirm_ctx *cctx; chost = reserved = NULL; if ((reserved = buffer_get_string_ret(m, NULL)) == NULL || (chost = buffer_get_string_ret(m, NULL)) == NULL...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,487
process_mux_stop_listening(u_int rid, Channel *c, Buffer *m, Buffer *r) { debug("%s: channel %d: stop listening", __func__, c->self); if (options.control_master == SSHCTL_MASTER_ASK || options.control_master == SSHCTL_MASTER_AUTO_ASK) { if (!ask_permission("Disable further multiplexing on shared " "conn...
null
0
process_mux_stop_listening(u_int rid, Channel *c, Buffer *m, Buffer *r) { debug("%s: channel %d: stop listening", __func__, c->self); if (options.control_master == SSHCTL_MASTER_ASK || options.control_master == SSHCTL_MASTER_AUTO_ASK) { if (!ask_permission("Disable further multiplexing on shared " "conn...
@@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.57 2015/12/26 07:46:03 semarie Exp $ */ +/* $OpenBSD: mux.c,v 1.58 2016/01/13 23:04:47 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -1354,16 +1354,18 @@ mux_session_confirm(int id, int success, void *arg) char *proto, *data; /* Get r...
CWE-254
null
null
12,488
check_agent_present(void) { int r; if (options.forward_agent) { /* Clear agent forwarding if we don't have an agent. */ if ((r = ssh_get_authentication_socket(NULL)) != 0) { options.forward_agent = 0; if (r != SSH_ERR_AGENT_NOT_PRESENT) debug("ssh_get_authentication_socket: %s", ssh_err(r)); ...
null
0
check_agent_present(void) { int r; if (options.forward_agent) { /* Clear agent forwarding if we don't have an agent. */ if ((r = ssh_get_authentication_socket(NULL)) != 0) { options.forward_agent = 0; if (r != SSH_ERR_AGENT_NOT_PRESENT) debug("ssh_get_authentication_socket: %s", ssh_err(r)); ...
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.432 2015/12/11 03:20:09 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1626,6 +1626,7 @@ ssh_session(void) struct winsize ws; char *cp...
CWE-254
null
null
12,489
check_follow_cname(char **namep, const char *cname) { int i; struct allowed_cname *rule; if (*cname == '\0' || options.num_permitted_cnames == 0 || strcmp(*namep, cname) == 0) return 0; if (options.canonicalize_hostname == SSH_CANONICALISE_NO) return 0; /* * Don't attempt to canonicalize names that wil...
null
0
check_follow_cname(char **namep, const char *cname) { int i; struct allowed_cname *rule; if (*cname == '\0' || options.num_permitted_cnames == 0 || strcmp(*namep, cname) == 0) return 0; if (options.canonicalize_hostname == SSH_CANONICALISE_NO) return 0; /* * Don't attempt to canonicalize names that wil...
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.432 2015/12/11 03:20:09 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1626,6 +1626,7 @@ ssh_session(void) struct winsize ws; char *cp...
CWE-254
null
null
12,490
client_cleanup_stdio_fwd(int id, void *arg) { debug("stdio forwarding: done"); cleanup_exit(0); }
null
0
client_cleanup_stdio_fwd(int id, void *arg) { debug("stdio forwarding: done"); cleanup_exit(0); }
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.432 2015/12/11 03:20:09 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1626,6 +1626,7 @@ ssh_session(void) struct winsize ws; char *cp...
CWE-254
null
null
12,491
control_persist_detach(void) { pid_t pid; int devnull; debug("%s: backgrounding master process", __func__); /* * master (current process) into the background, and make the * foreground process a client of the backgrounded master. */ switch ((pid = fork())) { case -1: fatal("%s: fork: %s", __func__, ...
null
0
control_persist_detach(void) { pid_t pid; int devnull; debug("%s: backgrounding master process", __func__); /* * master (current process) into the background, and make the * foreground process a client of the backgrounded master. */ switch ((pid = fork())) { case -1: fatal("%s: fork: %s", __func__, ...
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.432 2015/12/11 03:20:09 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1626,6 +1626,7 @@ ssh_session(void) struct winsize ws; char *cp...
CWE-254
null
null
12,492
main(int ac, char **av) { int i, r, opt, exit_status, use_syslog, config_test = 0; char *p, *cp, *line, *argv0, buf[PATH_MAX], *host_arg, *logfile; char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV]; char cname[NI_MAXHOST], uidstr[32], *conn_hash_hex; struct stat st; struct passwd *pw; int tim...
null
0
main(int ac, char **av) { int i, r, opt, exit_status, use_syslog, config_test = 0; char *p, *cp, *line, *argv0, buf[PATH_MAX], *host_arg, *logfile; char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV]; char cname[NI_MAXHOST], uidstr[32], *conn_hash_hex; struct stat st; struct passwd *pw; int tim...
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.432 2015/12/11 03:20:09 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1626,6 +1626,7 @@ ssh_session(void) struct winsize ws; char *cp...
CWE-254
null
null
12,493
process_config_files(const char *host_arg, struct passwd *pw, int post_canon) { char buf[PATH_MAX]; int r; if (config != NULL) { if (strcasecmp(config, "none") != 0 && !read_config_file(config, pw, host, host_arg, &options, SSHCONF_USERCONF | (post_canon ? SSHCONF_POSTCANON : 0))) fatal("Can't open...
null
0
process_config_files(const char *host_arg, struct passwd *pw, int post_canon) { char buf[PATH_MAX]; int r; if (config != NULL) { if (strcasecmp(config, "none") != 0 && !read_config_file(config, pw, host, host_arg, &options, SSHCONF_USERCONF | (post_canon ? SSHCONF_POSTCANON : 0))) fatal("Can't open...
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.432 2015/12/11 03:20:09 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1626,6 +1626,7 @@ ssh_session(void) struct winsize ws; char *cp...
CWE-254
null
null
12,494
resolve_canonicalize(char **hostp, int port) { int i, ndots; char *cp, *fullhost, newname[NI_MAXHOST]; struct addrinfo *addrs; if (options.canonicalize_hostname == SSH_CANONICALISE_NO) return NULL; /* * Don't attempt to canonicalize names that will be interpreted by * a proxy unless the user specifically r...
null
0
resolve_canonicalize(char **hostp, int port) { int i, ndots; char *cp, *fullhost, newname[NI_MAXHOST]; struct addrinfo *addrs; if (options.canonicalize_hostname == SSH_CANONICALISE_NO) return NULL; /* * Don't attempt to canonicalize names that will be interpreted by * a proxy unless the user specifically r...
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.432 2015/12/11 03:20:09 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1626,6 +1626,7 @@ ssh_session(void) struct winsize ws; char *cp...
CWE-254
null
null
12,495
resolve_host(const char *name, int port, int logerr, char *cname, size_t clen) { char strport[NI_MAXSERV]; struct addrinfo hints, *res; int gaierr, loglevel = SYSLOG_LEVEL_DEBUG1; if (port <= 0) port = default_ssh_port(); snprintf(strport, sizeof strport, "%d", port); memset(&hints, 0, sizeof(hints)); hints....
null
0
resolve_host(const char *name, int port, int logerr, char *cname, size_t clen) { char strport[NI_MAXSERV]; struct addrinfo hints, *res; int gaierr, loglevel = SYSLOG_LEVEL_DEBUG1; if (port <= 0) port = default_ssh_port(); snprintf(strport, sizeof strport, "%d", port); memset(&hints, 0, sizeof(hints)); hints....
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.432 2015/12/11 03:20:09 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1626,6 +1626,7 @@ ssh_session(void) struct winsize ws; char *cp...
CWE-254
null
null
12,496
set_addrinfo_port(struct addrinfo *addrs, int port) { struct addrinfo *addr; for (addr = addrs; addr != NULL; addr = addr->ai_next) { switch (addr->ai_family) { case AF_INET: ((struct sockaddr_in *)addr->ai_addr)-> sin_port = htons(port); break; case AF_INET6: ((struct sockaddr_in6 *)addr->ai_a...
null
0
set_addrinfo_port(struct addrinfo *addrs, int port) { struct addrinfo *addr; for (addr = addrs; addr != NULL; addr = addr->ai_next) { switch (addr->ai_family) { case AF_INET: ((struct sockaddr_in *)addr->ai_addr)-> sin_port = htons(port); break; case AF_INET6: ((struct sockaddr_in6 *)addr->ai_a...
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.432 2015/12/11 03:20:09 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1626,6 +1626,7 @@ ssh_session(void) struct winsize ws; char *cp...
CWE-254
null
null
12,497
ssh_confirm_remote_forward(int type, u_int32_t seq, void *ctxt) { struct Forward *rfwd = (struct Forward *)ctxt; /* XXX verbose() on failure? */ debug("remote forward %s for: listen %s%s%d, connect %s:%d", type == SSH2_MSG_REQUEST_SUCCESS ? "success" : "failure", rfwd->listen_path ? rfwd->listen_path : ...
null
0
ssh_confirm_remote_forward(int type, u_int32_t seq, void *ctxt) { struct Forward *rfwd = (struct Forward *)ctxt; /* XXX verbose() on failure? */ debug("remote forward %s for: listen %s%s%d, connect %s:%d", type == SSH2_MSG_REQUEST_SUCCESS ? "success" : "failure", rfwd->listen_path ? rfwd->listen_path : ...
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.432 2015/12/11 03:20:09 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1626,6 +1626,7 @@ ssh_session(void) struct winsize ws; char *cp...
CWE-254
null
null
12,498
ssh_init_forwarding(void) { int success = 0; int i; /* Initiate local TCP/IP port forwardings. */ for (i = 0; i < options.num_local_forwards; i++) { debug("Local connections to %.200s:%d forwarded to remote " "address %.200s:%d", (options.local_forwards[i].listen_path != NULL) ? options.local_f...
null
0
ssh_init_forwarding(void) { int success = 0; int i; /* Initiate local TCP/IP port forwardings. */ for (i = 0; i < options.num_local_forwards; i++) { debug("Local connections to %.200s:%d forwarded to remote " "address %.200s:%d", (options.local_forwards[i].listen_path != NULL) ? options.local_f...
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.432 2015/12/11 03:20:09 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1626,6 +1626,7 @@ ssh_session(void) struct winsize ws; char *cp...
CWE-254
null
null
12,499
ssh_init_stdio_forwarding(void) { Channel *c; int in, out; if (stdio_forward_host == NULL) return; if (!compat20) fatal("stdio forwarding require Protocol 2"); debug3("%s: %s:%d", __func__, stdio_forward_host, stdio_forward_port); if ((in = dup(STDIN_FILENO)) < 0 || (out = dup(STDOUT_FILENO)) < 0) f...
null
0
ssh_init_stdio_forwarding(void) { Channel *c; int in, out; if (stdio_forward_host == NULL) return; if (!compat20) fatal("stdio forwarding require Protocol 2"); debug3("%s: %s:%d", __func__, stdio_forward_host, stdio_forward_port); if ((in = dup(STDIN_FILENO)) < 0 || (out = dup(STDOUT_FILENO)) < 0) f...
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.432 2015/12/11 03:20:09 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.433 2016/01/13 23:04:47 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1626,6 +1626,7 @@ ssh_session(void) struct winsize ws; char *cp...
CWE-254
null
null