idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
13,800
MainURLRequestContextGetter( BrowserContextIOData* context, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) : context_(context), request_interceptors_(std::move(request_interceptors)) { std::swap(protocol_handlers_, *pr...
null
0
MainURLRequestContextGetter( BrowserContextIOData* context, content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) : context_(context), request_interceptors_(std::move(request_interceptors)) { std::swap(protocol_handlers_, *pr...
@@ -558,24 +558,16 @@ class OTRBrowserContextImpl : public BrowserContext { public: OTRBrowserContextImpl(BrowserContextImpl* original, BrowserContextIODataImpl* original_io_data); - - base::WeakPtr<OTRBrowserContextImpl> GetWeakPtr() { - return weak_ptr_factory_.GetWeakPtr(); - } + ...
CWE-20
null
null
13,801
OTRBrowserContextIODataImpl(BrowserContextIODataImpl* original) : original_io_data_(original) {}
null
0
OTRBrowserContextIODataImpl(BrowserContextIODataImpl* original) : original_io_data_(original) {}
@@ -558,24 +558,16 @@ class OTRBrowserContextImpl : public BrowserContext { public: OTRBrowserContextImpl(BrowserContextImpl* original, BrowserContextIODataImpl* original_io_data); - - base::WeakPtr<OTRBrowserContextImpl> GetWeakPtr() { - return weak_ptr_factory_.GetWeakPtr(); - } + ...
CWE-20
null
null
13,802
BrowserContextIOData::~BrowserContextIOData() { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); }
null
0
BrowserContextIOData::~BrowserContextIOData() { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); }
@@ -558,24 +558,16 @@ class OTRBrowserContextImpl : public BrowserContext { public: OTRBrowserContextImpl(BrowserContextImpl* original, BrowserContextIODataImpl* original_io_data); - - base::WeakPtr<OTRBrowserContextImpl> GetWeakPtr() { - return weak_ptr_factory_.GetWeakPtr(); - } + ...
CWE-20
null
null
13,803
BrowserMainParts::BrowserMainParts() {}
null
0
BrowserMainParts::BrowserMainParts() {}
@@ -49,6 +49,7 @@ #include "shared/gpu/oxide_gl_context_dependent.h" #include "oxide_browser_context.h" +#include "oxide_browser_context_destroyer.h" #include "oxide_browser_platform_integration.h" #include "oxide_browser_process_main.h" #include "oxide_geolocation_delegate.h" @@ -57,6 +58,7 @@ #include "oxide_...
CWE-20
null
null
13,804
bool CanUseSharedGLContext() { #if defined(ENABLE_HYBRIS) if (!HybrisUtils::GetInstance()->IsUsingAndroidEGL()) { return true; } if (content::GpuDataManagerImpl::GetInstance()->IsDriverBugWorkaroundActive( gpu::USE_VIRTUALIZED_GL_CONTEXTS)) { return false; } #endif return true; }
null
0
bool CanUseSharedGLContext() { #if defined(ENABLE_HYBRIS) if (!HybrisUtils::GetInstance()->IsUsingAndroidEGL()) { return true; } if (content::GpuDataManagerImpl::GetInstance()->IsDriverBugWorkaroundActive( gpu::USE_VIRTUALIZED_GL_CONTEXTS)) { return false; } #endif return true; }
@@ -49,6 +49,7 @@ #include "shared/gpu/oxide_gl_context_dependent.h" #include "oxide_browser_context.h" +#include "oxide_browser_context_destroyer.h" #include "oxide_browser_platform_integration.h" #include "oxide_browser_process_main.h" #include "oxide_geolocation_delegate.h" @@ -57,6 +58,7 @@ #include "oxide_...
CWE-20
null
null
13,805
ui::Clipboard* CreateClipboard() { return BrowserPlatformIntegration::GetInstance()->CreateClipboard(); }
null
0
ui::Clipboard* CreateClipboard() { return BrowserPlatformIntegration::GetInstance()->CreateClipboard(); }
@@ -49,6 +49,7 @@ #include "shared/gpu/oxide_gl_context_dependent.h" #include "oxide_browser_context.h" +#include "oxide_browser_context_destroyer.h" #include "oxide_browser_platform_integration.h" #include "oxide_browser_process_main.h" #include "oxide_geolocation_delegate.h" @@ -57,6 +58,7 @@ #include "oxide_...
CWE-20
null
null
13,806
std::unique_ptr<base::MessagePump> CreateUIMessagePump() { return BrowserPlatformIntegration::GetInstance()->CreateUIMessagePump(); }
null
0
std::unique_ptr<base::MessagePump> CreateUIMessagePump() { return BrowserPlatformIntegration::GetInstance()->CreateUIMessagePump(); }
@@ -49,6 +49,7 @@ #include "shared/gpu/oxide_gl_context_dependent.h" #include "oxide_browser_context.h" +#include "oxide_browser_context_destroyer.h" #include "oxide_browser_platform_integration.h" #include "oxide_browser_process_main.h" #include "oxide_geolocation_delegate.h" @@ -57,6 +58,7 @@ #include "oxide_...
CWE-20
null
null
13,807
OverrideVideoCaptureDeviceFactory( std::unique_ptr<media::VideoCaptureDeviceFactory> platform_factory) { return base::WrapUnique( new VideoCaptureDeviceFactoryLinux(std::move(platform_factory))); }
null
0
OverrideVideoCaptureDeviceFactory( std::unique_ptr<media::VideoCaptureDeviceFactory> platform_factory) { return base::WrapUnique( new VideoCaptureDeviceFactoryLinux(std::move(platform_factory))); }
@@ -49,6 +49,7 @@ #include "shared/gpu/oxide_gl_context_dependent.h" #include "oxide_browser_context.h" +#include "oxide_browser_context_destroyer.h" #include "oxide_browser_platform_integration.h" #include "oxide_browser_process_main.h" #include "oxide_geolocation_delegate.h" @@ -57,6 +58,7 @@ #include "oxide_...
CWE-20
null
null
13,808
int BrowserMainParts::PreCreateThreads() { gfx::InitializeOxideNativeDisplay( BrowserPlatformIntegration::GetInstance()->GetNativeDisplay()); { ScopedBindGLESAPI gles_binder; gl::init::InitializeGLOneOff(); } device_client_.reset(new DeviceClient()); primary_screen_.reset(new display::Screen...
null
0
int BrowserMainParts::PreCreateThreads() { gfx::InitializeOxideNativeDisplay( BrowserPlatformIntegration::GetInstance()->GetNativeDisplay()); { ScopedBindGLESAPI gles_binder; gl::init::InitializeGLOneOff(); } device_client_.reset(new DeviceClient()); primary_screen_.reset(new display::Screen...
@@ -49,6 +49,7 @@ #include "shared/gpu/oxide_gl_context_dependent.h" #include "oxide_browser_context.h" +#include "oxide_browser_context_destroyer.h" #include "oxide_browser_platform_integration.h" #include "oxide_browser_process_main.h" #include "oxide_geolocation_delegate.h" @@ -57,6 +58,7 @@ #include "oxide_...
CWE-20
null
null
13,809
void BrowserMainParts::PreEarlyInitialization() { content::SetWebContentsViewOxideFactory(WebContentsView::Create); #if defined(OS_LINUX) media::SetVideoCaptureDeviceFactoryOverrideDelegate( OverrideVideoCaptureDeviceFactory); #endif ui::SetClipboardOxideFactory(CreateClipboard); #if defined(OS_LINUX) gp...
null
0
void BrowserMainParts::PreEarlyInitialization() { content::SetWebContentsViewOxideFactory(WebContentsView::Create); #if defined(OS_LINUX) media::SetVideoCaptureDeviceFactoryOverrideDelegate( OverrideVideoCaptureDeviceFactory); #endif ui::SetClipboardOxideFactory(CreateClipboard); #if defined(OS_LINUX) gp...
@@ -49,6 +49,7 @@ #include "shared/gpu/oxide_gl_context_dependent.h" #include "oxide_browser_context.h" +#include "oxide_browser_context_destroyer.h" #include "oxide_browser_platform_integration.h" #include "oxide_browser_process_main.h" #include "oxide_geolocation_delegate.h" @@ -57,6 +58,7 @@ #include "oxide_...
CWE-20
null
null
13,810
BrowserMainParts::~BrowserMainParts() {}
null
0
BrowserMainParts::~BrowserMainParts() {}
@@ -49,6 +49,7 @@ #include "shared/gpu/oxide_gl_context_dependent.h" #include "oxide_browser_context.h" +#include "oxide_browser_context_destroyer.h" #include "oxide_browser_platform_integration.h" #include "oxide_browser_process_main.h" #include "oxide_geolocation_delegate.h" @@ -57,6 +58,7 @@ #include "oxide_...
CWE-20
null
null
13,811
ScopedBindGLESAPI::~ScopedBindGLESAPI() { if (!has_egl_) { return; } DCHECK(egl_lib_.is_valid()); DCHECK_NE(orig_api_, static_cast<EGLenum>(EGL_NONE)); _eglBindAPI eglBindAPI = reinterpret_cast<_eglBindAPI>( egl_lib_.GetFunctionPointer("eglBindAPI")); DCHECK(eglBindAPI); eglBindAPI(orig_api_)...
null
0
ScopedBindGLESAPI::~ScopedBindGLESAPI() { if (!has_egl_) { return; } DCHECK(egl_lib_.is_valid()); DCHECK_NE(orig_api_, static_cast<EGLenum>(EGL_NONE)); _eglBindAPI eglBindAPI = reinterpret_cast<_eglBindAPI>( egl_lib_.GetFunctionPointer("eglBindAPI")); DCHECK(eglBindAPI); eglBindAPI(orig_api_)...
@@ -49,6 +49,7 @@ #include "shared/gpu/oxide_gl_context_dependent.h" #include "oxide_browser_context.h" +#include "oxide_browser_context_destroyer.h" #include "oxide_browser_platform_integration.h" #include "oxide_browser_process_main.h" #include "oxide_geolocation_delegate.h" @@ -57,6 +58,7 @@ #include "oxide_...
CWE-20
null
null
13,812
std::string GetEnvironmentOption(base::StringPiece option, base::Environment* env) { std::string name("OXIDE_"); name += option.data(); std::string result; env->GetVar(name, &result); return result; }
null
0
std::string GetEnvironmentOption(base::StringPiece option, base::Environment* env) { std::string name("OXIDE_"); name += option.data(); std::string result; env->GetVar(name, &result); return result; }
@@ -72,10 +72,8 @@ #include "shared/common/oxide_content_client.h" #include "shared/common/oxide_form_factor.h" -#include "oxide_browser_context.h" #include "oxide_form_factor_detection.h" #include "oxide_message_pump.h" -#include "oxide_web_contents_unloader.h" namespace content { @@ -581,14 +579,6 @@ void ...
CWE-20
null
null
13,813
const char* GetFormFactorHintCommandLine(FormFactor form_factor) { switch (form_factor) { case FORM_FACTOR_DESKTOP: return switches::kFormFactorDesktop; case FORM_FACTOR_TABLET: return switches::kFormFactorTablet; case FORM_FACTOR_PHONE: return switches::kFormFactorPhone; } NOTREACH...
null
0
const char* GetFormFactorHintCommandLine(FormFactor form_factor) { switch (form_factor) { case FORM_FACTOR_DESKTOP: return switches::kFormFactorDesktop; case FORM_FACTOR_TABLET: return switches::kFormFactorTablet; case FORM_FACTOR_PHONE: return switches::kFormFactorPhone; } NOTREACH...
@@ -72,10 +72,8 @@ #include "shared/common/oxide_content_client.h" #include "shared/common/oxide_form_factor.h" -#include "oxide_browser_context.h" #include "oxide_form_factor_detection.h" #include "oxide_message_pump.h" -#include "oxide_web_contents_unloader.h" namespace content { @@ -581,14 +579,6 @@ void ...
CWE-20
null
null
13,814
const char* GetGLImplName(gl::GLImplementation impl) { switch (impl) { case gl::kGLImplementationDesktopGL: return gl::kGLImplementationDesktopName; case gl::kGLImplementationOSMesaGL: return gl::kGLImplementationOSMesaName; case gl::kGLImplementationEGLGLES2: return gl::kGLImplementatio...
null
0
const char* GetGLImplName(gl::GLImplementation impl) { switch (impl) { case gl::kGLImplementationDesktopGL: return gl::kGLImplementationDesktopName; case gl::kGLImplementationOSMesaGL: return gl::kGLImplementationOSMesaName; case gl::kGLImplementationEGLGLES2: return gl::kGLImplementatio...
@@ -72,10 +72,8 @@ #include "shared/common/oxide_content_client.h" #include "shared/common/oxide_form_factor.h" -#include "oxide_browser_context.h" #include "oxide_form_factor_detection.h" #include "oxide_message_pump.h" -#include "oxide_web_contents_unloader.h" namespace content { @@ -581,14 +579,6 @@ void ...
CWE-20
null
null
13,815
base::FilePath GetSharedMemoryPath(base::Environment* env) { std::string snap_name; if (env->GetVar("SNAP_NAME", &snap_name)) { return base::FilePath(std::string("/dev/shm/snap.") + snap_name + ".oxide"); } std::string app_pkgname; if (env->GetVar("APP_ID", &app_pkgname)) { app_pkgname = app_pkgname....
null
0
base::FilePath GetSharedMemoryPath(base::Environment* env) { std::string snap_name; if (env->GetVar("SNAP_NAME", &snap_name)) { return base::FilePath(std::string("/dev/shm/snap.") + snap_name + ".oxide"); } std::string app_pkgname; if (env->GetVar("APP_ID", &app_pkgname)) { app_pkgname = app_pkgname....
@@ -72,10 +72,8 @@ #include "shared/common/oxide_content_client.h" #include "shared/common/oxide_form_factor.h" -#include "oxide_browser_context.h" #include "oxide_form_factor_detection.h" #include "oxide_message_pump.h" -#include "oxide_web_contents_unloader.h" namespace content { @@ -581,14 +579,6 @@ void ...
CWE-20
null
null
13,816
base::FilePath GetSubprocessPath(base::Environment* env) { std::string override_subprocess_path = GetEnvironmentOption("SUBPROCESS_PATH", env); if (!override_subprocess_path.empty()) { #if defined(OS_POSIX) base::FilePath subprocess_path(override_subprocess_path); #else base::FilePath subprocess_path(...
null
0
base::FilePath GetSubprocessPath(base::Environment* env) { std::string override_subprocess_path = GetEnvironmentOption("SUBPROCESS_PATH", env); if (!override_subprocess_path.empty()) { #if defined(OS_POSIX) base::FilePath subprocess_path(override_subprocess_path); #else base::FilePath subprocess_path(...
@@ -72,10 +72,8 @@ #include "shared/common/oxide_content_client.h" #include "shared/common/oxide_form_factor.h" -#include "oxide_browser_context.h" #include "oxide_form_factor_detection.h" #include "oxide_message_pump.h" -#include "oxide_web_contents_unloader.h" namespace content { @@ -581,14 +579,6 @@ void ...
CWE-20
null
null
13,817
void InitializeCommandLine(const std::string& argv0, const base::FilePath& subprocess_path, ProcessModel process_model, gl::GLImplementation gl_impl, base::Environment* env) { const char* argv0_c = nullptr; i...
null
0
void InitializeCommandLine(const std::string& argv0, const base::FilePath& subprocess_path, ProcessModel process_model, gl::GLImplementation gl_impl, base::Environment* env) { const char* argv0_c = nullptr; i...
@@ -72,10 +72,8 @@ #include "shared/common/oxide_content_client.h" #include "shared/common/oxide_form_factor.h" -#include "oxide_browser_context.h" #include "oxide_form_factor_detection.h" #include "oxide_message_pump.h" -#include "oxide_web_contents_unloader.h" namespace content { @@ -581,14 +579,6 @@ void ...
CWE-20
null
null
13,818
bool IsEnvironmentOptionEnabled(base::StringPiece option, base::Environment* env) { std::string name("OXIDE_"); name += option.data(); std::string result; if (!env->GetVar(name, &result)) { return false; } return result.size() > 0 && result[0] != '0'; }
null
0
bool IsEnvironmentOptionEnabled(base::StringPiece option, base::Environment* env) { std::string name("OXIDE_"); name += option.data(); std::string result; if (!env->GetVar(name, &result)) { return false; } return result.size() > 0 && result[0] != '0'; }
@@ -72,10 +72,8 @@ #include "shared/common/oxide_content_client.h" #include "shared/common/oxide_form_factor.h" -#include "oxide_browser_context.h" #include "oxide_form_factor_detection.h" #include "oxide_message_pump.h" -#include "oxide_web_contents_unloader.h" namespace content { @@ -581,14 +579,6 @@ void ...
CWE-20
null
null
13,819
bool IsUnsupportedProcessModel(ProcessModel process_model) { switch (process_model) { case PROCESS_MODEL_MULTI_PROCESS: case PROCESS_MODEL_SINGLE_PROCESS: case PROCESS_MODEL_PROCESS_PER_SITE_INSTANCE: return false; default: return true; } }
null
0
bool IsUnsupportedProcessModel(ProcessModel process_model) { switch (process_model) { case PROCESS_MODEL_MULTI_PROCESS: case PROCESS_MODEL_SINGLE_PROCESS: case PROCESS_MODEL_PROCESS_PER_SITE_INSTANCE: return false; default: return true; } }
@@ -72,10 +72,8 @@ #include "shared/common/oxide_content_client.h" #include "shared/common/oxide_form_factor.h" -#include "oxide_browser_context.h" #include "oxide_form_factor_detection.h" #include "oxide_message_pump.h" -#include "oxide_web_contents_unloader.h" namespace content { @@ -581,14 +579,6 @@ void ...
CWE-20
null
null
13,820
static void Set(ContentMainDelegate* delegate, bool single_process) { ContentClient* content_client = oxide::ContentClient::GetInstance(); content_client->browser_ = delegate->CreateContentBrowserClient(); if (single_process) { content_client->renderer_ = delegate->CreateContentRendererClient(); ...
null
0
static void Set(ContentMainDelegate* delegate, bool single_process) { ContentClient* content_client = oxide::ContentClient::GetInstance(); content_client->browser_ = delegate->CreateContentBrowserClient(); if (single_process) { content_client->renderer_ = delegate->CreateContentRendererClient(); ...
@@ -72,10 +72,8 @@ #include "shared/common/oxide_content_client.h" #include "shared/common/oxide_form_factor.h" -#include "oxide_browser_context.h" #include "oxide_form_factor_detection.h" #include "oxide_message_pump.h" -#include "oxide_web_contents_unloader.h" namespace content { @@ -581,14 +579,6 @@ void ...
CWE-20
null
null
13,821
void SetupAndVerifySignalHandlers() { struct sigaction sigact; CHECK(sigaction(SIGCHLD, nullptr, &sigact) == 0); CHECK(sigact.sa_handler != SIG_IGN) << "SIGCHLD should not be ignored"; CHECK((sigact.sa_flags & SA_NOCLDWAIT) == 0) << "SA_NOCLDWAIT should not be set"; CHECK(sigaction(SIGPIPE, nullptr, &s...
null
0
void SetupAndVerifySignalHandlers() { struct sigaction sigact; CHECK(sigaction(SIGCHLD, nullptr, &sigact) == 0); CHECK(sigact.sa_handler != SIG_IGN) << "SIGCHLD should not be ignored"; CHECK((sigact.sa_flags & SA_NOCLDWAIT) == 0) << "SA_NOCLDWAIT should not be set"; CHECK(sigaction(SIGPIPE, nullptr, &s...
@@ -72,10 +72,8 @@ #include "shared/common/oxide_content_client.h" #include "shared/common/oxide_form_factor.h" -#include "oxide_browser_context.h" #include "oxide_form_factor_detection.h" #include "oxide_message_pump.h" -#include "oxide_web_contents_unloader.h" namespace content { @@ -581,14 +579,6 @@ void ...
CWE-20
null
null
13,822
content::BrowserMainParts* ContentBrowserClient::CreateBrowserMainParts( const content::MainFunctionParams& parameters) { return new BrowserMainParts(); }
null
0
content::BrowserMainParts* ContentBrowserClient::CreateBrowserMainParts( const content::MainFunctionParams& parameters) { return new BrowserMainParts(); }
@@ -46,7 +46,9 @@ #include "shared/common/oxide_content_client.h" #include "display_form_factor.h" +#include "in_process_renderer_observer.h" #include "oxide_browser_context.h" +#include "oxide_browser_context_destroyer.h" #include "oxide_browser_main_parts.h" #include "oxide_browser_platform_integration.h" #in...
CWE-20
null
null
13,823
CatalogueCloseFont (FontPathElementPtr fpe, FontPtr pFont) { /* Note: this gets called with the actual subfpe where we found * the font, not the catalogue fpe. */ FontFileCloseFont(fpe, pFont); }
Overflow
0
CatalogueCloseFont (FontPathElementPtr fpe, FontPtr pFont) { /* Note: this gets called with the actual subfpe where we found * the font, not the catalogue fpe. */ FontFileCloseFont(fpe, pFont); }
@@ -156,7 +156,7 @@ CatalogueRescan (FontPathElementPtr fpe) while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); - len = readlink(link, dest, sizeof dest); + len = readlink(link, dest, sizeof dest - 1); if (len < 0) continue;
CWE-119
null
null
13,824
CatalogueFreeFPE (FontPathElementPtr fpe) { CataloguePtr cat = fpe->private; /* If the catalogue is modified while the xserver has fonts open * from the previous subfpes, we'll unref the old subfpes when we * reload the catalogue, and the xserver will the call FreeFPE on * them once it drops its...
Overflow
0
CatalogueFreeFPE (FontPathElementPtr fpe) { CataloguePtr cat = fpe->private; /* If the catalogue is modified while the xserver has fonts open * from the previous subfpes, we'll unref the old subfpes when we * reload the catalogue, and the xserver will the call FreeFPE on * them once it drops its...
@@ -156,7 +156,7 @@ CatalogueRescan (FontPathElementPtr fpe) while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); - len = readlink(link, dest, sizeof dest); + len = readlink(link, dest, sizeof dest - 1); if (len < 0) continue;
CWE-119
null
null
13,825
CatalogueInitFPE (FontPathElementPtr fpe) { CataloguePtr cat; cat = (CataloguePtr) xalloc(sizeof *cat); if (cat == NULL) return AllocError; fpe->private = (pointer) cat; cat->fpeCount = 0; cat->fpeAlloc = 0; cat->fpeList = NULL; cat->mtime = 0; return CatalogueRescan (fpe); }
Overflow
0
CatalogueInitFPE (FontPathElementPtr fpe) { CataloguePtr cat; cat = (CataloguePtr) xalloc(sizeof *cat); if (cat == NULL) return AllocError; fpe->private = (pointer) cat; cat->fpeCount = 0; cat->fpeAlloc = 0; cat->fpeList = NULL; cat->mtime = 0; return CatalogueRescan (fpe); }
@@ -156,7 +156,7 @@ CatalogueRescan (FontPathElementPtr fpe) while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); - len = readlink(link, dest, sizeof dest); + len = readlink(link, dest, sizeof dest - 1); if (len < 0) continue;
CWE-119
null
null
13,826
CatalogueListFonts (pointer client, FontPathElementPtr fpe, char *pat, int len, int max, FontNamesPtr names) { CataloguePtr cat = fpe->private; FontPathElementPtr subfpe; FontDirectoryPtr dir; int i; CatalogueRescan (fpe); for (i = 0; i < cat->fpeCount; i++) { subfpe = cat->fpeList...
Overflow
0
CatalogueListFonts (pointer client, FontPathElementPtr fpe, char *pat, int len, int max, FontNamesPtr names) { CataloguePtr cat = fpe->private; FontPathElementPtr subfpe; FontDirectoryPtr dir; int i; CatalogueRescan (fpe); for (i = 0; i < cat->fpeCount; i++) { subfpe = cat->fpeList...
@@ -156,7 +156,7 @@ CatalogueRescan (FontPathElementPtr fpe) while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); - len = readlink(link, dest, sizeof dest); + len = readlink(link, dest, sizeof dest - 1); if (len < 0) continue;
CWE-119
null
null
13,827
CatalogueListNextFontOrAlias(pointer client, FontPathElementPtr fpe, char **namep, int *namelenp, char **resolvedp, int *resolvedlenp, pointer private) { LFWIDataPtr data = private; CataloguePtr cat = fpe->private; int ret; if (data->current == cat->fpeCount) { xfree(data); re...
Overflow
0
CatalogueListNextFontOrAlias(pointer client, FontPathElementPtr fpe, char **namep, int *namelenp, char **resolvedp, int *resolvedlenp, pointer private) { LFWIDataPtr data = private; CataloguePtr cat = fpe->private; int ret; if (data->current == cat->fpeCount) { xfree(data); re...
@@ -156,7 +156,7 @@ CatalogueRescan (FontPathElementPtr fpe) while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); - len = readlink(link, dest, sizeof dest); + len = readlink(link, dest, sizeof dest - 1); if (len < 0) continue;
CWE-119
null
null
13,828
CatalogueListNextFontWithInfo(pointer client, FontPathElementPtr fpe, char **namep, int *namelenp, FontInfoPtr *pFontInfo, int *numFonts, pointer private) { LFWIDataPtr data = private; CataloguePtr cat = fpe->private; int ret; if (data->current == cat->fpeCount) { x...
Overflow
0
CatalogueListNextFontWithInfo(pointer client, FontPathElementPtr fpe, char **namep, int *namelenp, FontInfoPtr *pFontInfo, int *numFonts, pointer private) { LFWIDataPtr data = private; CataloguePtr cat = fpe->private; int ret; if (data->current == cat->fpeCount) { x...
@@ -156,7 +156,7 @@ CatalogueRescan (FontPathElementPtr fpe) while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); - len = readlink(link, dest, sizeof dest); + len = readlink(link, dest, sizeof dest - 1); if (len < 0) continue;
CWE-119
null
null
13,829
CatalogueNameCheck (char *name) { return strncmp(name, CataloguePrefix, sizeof(CataloguePrefix) - 1) == 0; }
Overflow
0
CatalogueNameCheck (char *name) { return strncmp(name, CataloguePrefix, sizeof(CataloguePrefix) - 1) == 0; }
@@ -156,7 +156,7 @@ CatalogueRescan (FontPathElementPtr fpe) while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); - len = readlink(link, dest, sizeof dest); + len = readlink(link, dest, sizeof dest - 1); if (len < 0) continue;
CWE-119
null
null
13,830
CatalogueOpenFont (pointer client, FontPathElementPtr fpe, Mask flags, char *name, int namelen, fsBitmapFormat format, fsBitmapFormatMask fmask, XID id, FontPtr *pFont, char **aliasName, FontPtr non_cachable_font) { CataloguePtr cat = fpe->private; FontPathElementPtr subfpe; FontDirec...
Overflow
0
CatalogueOpenFont (pointer client, FontPathElementPtr fpe, Mask flags, char *name, int namelen, fsBitmapFormat format, fsBitmapFormatMask fmask, XID id, FontPtr *pFont, char **aliasName, FontPtr non_cachable_font) { CataloguePtr cat = fpe->private; FontPathElementPtr subfpe; FontDirec...
@@ -156,7 +156,7 @@ CatalogueRescan (FontPathElementPtr fpe) while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); - len = readlink(link, dest, sizeof dest); + len = readlink(link, dest, sizeof dest - 1); if (len < 0) continue;
CWE-119
null
null
13,831
CatalogueRegisterLocalFpeFunctions (void) { RegisterFPEFunctions(CatalogueNameCheck, CatalogueInitFPE, CatalogueFreeFPE, CatalogueResetFPE, CatalogueOpenFont, CatalogueCloseFont, CatalogueListFonts, CatalogueStartListFontsWithInfo, CatalogueListNextFontWithInfo, NULL, NULL, ...
Overflow
0
CatalogueRegisterLocalFpeFunctions (void) { RegisterFPEFunctions(CatalogueNameCheck, CatalogueInitFPE, CatalogueFreeFPE, CatalogueResetFPE, CatalogueOpenFont, CatalogueCloseFont, CatalogueListFonts, CatalogueStartListFontsWithInfo, CatalogueListNextFontWithInfo, NULL, NULL, ...
@@ -156,7 +156,7 @@ CatalogueRescan (FontPathElementPtr fpe) while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); - len = readlink(link, dest, sizeof dest); + len = readlink(link, dest, sizeof dest - 1); if (len < 0) continue;
CWE-119
null
null
13,832
CatalogueResetFPE (FontPathElementPtr fpe) { /* Always just tell the caller to close and re-open */ return FPEResetFailed; }
Overflow
0
CatalogueResetFPE (FontPathElementPtr fpe) { /* Always just tell the caller to close and re-open */ return FPEResetFailed; }
@@ -156,7 +156,7 @@ CatalogueRescan (FontPathElementPtr fpe) while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); - len = readlink(link, dest, sizeof dest); + len = readlink(link, dest, sizeof dest - 1); if (len < 0) continue;
CWE-119
null
null
13,833
CatalogueStartListFontsAndAliases(pointer client, FontPathElementPtr fpe, char *pat, int len, int max, pointer *privatep) { return CatalogueStartListFonts(client, fpe, pat, len, max, privatep, 1); }
Overflow
0
CatalogueStartListFontsAndAliases(pointer client, FontPathElementPtr fpe, char *pat, int len, int max, pointer *privatep) { return CatalogueStartListFonts(client, fpe, pat, len, max, privatep, 1); }
@@ -156,7 +156,7 @@ CatalogueRescan (FontPathElementPtr fpe) while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); - len = readlink(link, dest, sizeof dest); + len = readlink(link, dest, sizeof dest - 1); if (len < 0) continue;
CWE-119
null
null
13,834
CatalogueStartListFontsWithInfo(pointer client, FontPathElementPtr fpe, char *pat, int len, int max, pointer *privatep) { return CatalogueStartListFonts(client, fpe, pat, len, max, privatep, 0); }
Overflow
0
CatalogueStartListFontsWithInfo(pointer client, FontPathElementPtr fpe, char *pat, int len, int max, pointer *privatep) { return CatalogueStartListFonts(client, fpe, pat, len, max, privatep, 0); }
@@ -156,7 +156,7 @@ CatalogueRescan (FontPathElementPtr fpe) while (entry = readdir(dir), entry != NULL) { snprintf(link, sizeof link, "%s/%s", path, entry->d_name); - len = readlink(link, dest, sizeof dest); + len = readlink(link, dest, sizeof dest - 1); if (len < 0) continue;
CWE-119
null
null
13,835
tt_cmap10_char_index( TT_CMap cmap, FT_UInt32 char_code ) { FT_Byte* table = cmap->data; FT_UInt result = 0; FT_Byte* p = table + 12; FT_UInt32 start = TT_NEXT_ULONG( p ); FT_UInt32 count = TT_NEXT_ULONG( p ); FT_UInt32 idx; if ( char_code ...
null
0
tt_cmap10_char_index( TT_CMap cmap, FT_UInt32 char_code ) { FT_Byte* table = cmap->data; FT_UInt result = 0; FT_Byte* p = table + 12; FT_UInt32 start = TT_NEXT_ULONG( p ); FT_UInt32 count = TT_NEXT_ULONG( p ); FT_UInt32 idx; if ( char_code ...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,836
tt_cmap12_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { TT_CMap12 cmap12 = (TT_CMap12)cmap; FT_UInt gindex; /* no need to search */ if ( cmap12->valid && cmap12->cur_charcode == *pchar_code ) { tt_cmap12_next( cmap12 ); if ( cmap12->valid ) ...
null
0
tt_cmap12_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { TT_CMap12 cmap12 = (TT_CMap12)cmap; FT_UInt gindex; /* no need to search */ if ( cmap12->valid && cmap12->cur_charcode == *pchar_code ) { tt_cmap12_next( cmap12 ); if ( cmap12->valid ) ...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,837
tt_cmap12_next( TT_CMap12 cmap ) { FT_Face face = cmap->cmap.cmap.charmap.face; FT_Byte* p; FT_ULong start, end, start_id, char_code; FT_ULong n; FT_UInt gindex; if ( cmap->cur_charcode >= 0xFFFFFFFFUL ) goto Fail; char_code = cmap->cur_charcode + 1; for ( n = cmap-...
null
0
tt_cmap12_next( TT_CMap12 cmap ) { FT_Face face = cmap->cmap.cmap.charmap.face; FT_Byte* p; FT_ULong start, end, start_id, char_code; FT_ULong n; FT_UInt gindex; if ( cmap->cur_charcode >= 0xFFFFFFFFUL ) goto Fail; char_code = cmap->cur_charcode + 1; for ( n = cmap-...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,838
tt_cmap13_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { TT_CMap13 cmap13 = (TT_CMap13)cmap; FT_UInt gindex; /* no need to search */ if ( cmap13->valid && cmap13->cur_charcode == *pchar_code ) { tt_cmap13_next( cmap13 ); if ( cmap13->valid ) ...
null
0
tt_cmap13_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { TT_CMap13 cmap13 = (TT_CMap13)cmap; FT_UInt gindex; /* no need to search */ if ( cmap13->valid && cmap13->cur_charcode == *pchar_code ) { tt_cmap13_next( cmap13 ); if ( cmap13->valid ) ...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,839
tt_cmap2_char_index( TT_CMap cmap, FT_UInt32 char_code ) { FT_Byte* table = cmap->data; FT_UInt result = 0; FT_Byte* subheader; subheader = tt_cmap2_get_subheader( table, char_code ); if ( subheader ) { FT_Byte* p = subheader; FT_UInt idx ...
null
0
tt_cmap2_char_index( TT_CMap cmap, FT_UInt32 char_code ) { FT_Byte* table = cmap->data; FT_UInt result = 0; FT_Byte* subheader; subheader = tt_cmap2_get_subheader( table, char_code ); if ( subheader ) { FT_Byte* p = subheader; FT_UInt idx ...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,840
tt_cmap2_char_next( TT_CMap cmap, FT_UInt32 *pcharcode ) { FT_Byte* table = cmap->data; FT_UInt gindex = 0; FT_UInt32 result = 0; FT_UInt32 charcode = *pcharcode + 1; FT_Byte* subheader; while ( charcode < 0x10000UL ) { subheader = tt_cm...
null
0
tt_cmap2_char_next( TT_CMap cmap, FT_UInt32 *pcharcode ) { FT_Byte* table = cmap->data; FT_UInt gindex = 0; FT_UInt32 result = 0; FT_UInt32 charcode = *pcharcode + 1; FT_Byte* subheader; while ( charcode < 0x10000UL ) { subheader = tt_cm...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,841
tt_cmap4_char_map_binary( TT_CMap cmap, FT_UInt32* pcharcode, FT_Bool next ) { FT_UInt num_segs2, start, end, offset; FT_Int delta; FT_UInt max, min, mid, num_segs; FT_UInt charcode = (FT_UInt)*pcharcode; FT_UInt gindex ...
null
0
tt_cmap4_char_map_binary( TT_CMap cmap, FT_UInt32* pcharcode, FT_Bool next ) { FT_UInt num_segs2, start, end, offset; FT_Int delta; FT_UInt max, min, mid, num_segs; FT_UInt charcode = (FT_UInt)*pcharcode; FT_UInt gindex ...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,842
tt_cmap4_char_map_linear( TT_CMap cmap, FT_UInt32* pcharcode, FT_Bool next ) { TT_Face face = (TT_Face)cmap->cmap.charmap.face; FT_Byte* limit = face->cmap_table + face->cmap_size; FT_UInt num_segs2, start, end, offset; FT_Int...
null
0
tt_cmap4_char_map_linear( TT_CMap cmap, FT_UInt32* pcharcode, FT_Bool next ) { TT_Face face = (TT_Face)cmap->cmap.charmap.face; FT_Byte* limit = face->cmap_table + face->cmap_size; FT_UInt num_segs2, start, end, offset; FT_Int...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,843
tt_cmap4_next( TT_CMap4 cmap ) { FT_UInt charcode; if ( cmap->cur_charcode >= 0xFFFFUL ) goto Fail; charcode = (FT_UInt)cmap->cur_charcode + 1; if ( charcode < cmap->cur_start ) charcode = cmap->cur_start; for ( ;; ) { FT_Byte* values = cmap->cur_values; FT_UI...
null
0
tt_cmap4_next( TT_CMap4 cmap ) { FT_UInt charcode; if ( cmap->cur_charcode >= 0xFFFFUL ) goto Fail; charcode = (FT_UInt)cmap->cur_charcode + 1; if ( charcode < cmap->cur_start ) charcode = cmap->cur_start; for ( ;; ) { FT_Byte* values = cmap->cur_values; FT_UI...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,844
tt_cmap4_validate( FT_Byte* table, FT_Validator valid ) { FT_Byte* p; FT_UInt length; FT_Byte *ends, *starts, *offsets, *deltas, *glyph_ids; FT_UInt num_segs; FT_Error error = FT_Err_Ok; if ( table + 2 + 2 > valid->limit ) FT_INVALID_TOO_SHORT; ...
null
0
tt_cmap4_validate( FT_Byte* table, FT_Validator valid ) { FT_Byte* p; FT_UInt length; FT_Byte *ends, *starts, *offsets, *deltas, *glyph_ids; FT_UInt num_segs; FT_Error error = FT_Err_Ok; if ( table + 2 + 2 > valid->limit ) FT_INVALID_TOO_SHORT; ...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,845
tt_cmap6_char_index( TT_CMap cmap, FT_UInt32 char_code ) { FT_Byte* table = cmap->data; FT_UInt result = 0; FT_Byte* p = table + 6; FT_UInt start = TT_NEXT_USHORT( p ); FT_UInt count = TT_NEXT_USHORT( p ); FT_UInt idx = (FT_UInt)( char_code - s...
null
0
tt_cmap6_char_index( TT_CMap cmap, FT_UInt32 char_code ) { FT_Byte* table = cmap->data; FT_UInt result = 0; FT_Byte* p = table + 6; FT_UInt start = TT_NEXT_USHORT( p ); FT_UInt count = TT_NEXT_USHORT( p ); FT_UInt idx = (FT_UInt)( char_code - s...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,846
tt_cmap6_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { FT_Byte* table = cmap->data; FT_UInt32 result = 0; FT_UInt32 char_code = *pchar_code + 1; FT_UInt gindex = 0; FT_Byte* p = table + 6; FT_UInt start = TT_NEXT_USHORT( p );...
null
0
tt_cmap6_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { FT_Byte* table = cmap->data; FT_UInt32 result = 0; FT_UInt32 char_code = *pchar_code + 1; FT_UInt gindex = 0; FT_Byte* p = table + 6; FT_UInt start = TT_NEXT_USHORT( p );...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,847
tt_cmap8_char_index( TT_CMap cmap, FT_UInt32 char_code ) { FT_Byte* table = cmap->data; FT_UInt result = 0; FT_Byte* p = table + 8204; FT_UInt32 num_groups = TT_NEXT_ULONG( p ); FT_UInt32 start, end, start_id; for ( ; num_groups > 0; nu...
null
0
tt_cmap8_char_index( TT_CMap cmap, FT_UInt32 char_code ) { FT_Byte* table = cmap->data; FT_UInt result = 0; FT_Byte* p = table + 8204; FT_UInt32 num_groups = TT_NEXT_ULONG( p ); FT_UInt32 start, end, start_id; for ( ; num_groups > 0; nu...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,848
tt_cmap8_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { FT_Face face = cmap->cmap.charmap.face; FT_UInt32 result = 0; FT_UInt32 char_code; FT_UInt gindex = 0; FT_Byte* table = cmap->data; FT_Byte* p = table + 8204; FT...
null
0
tt_cmap8_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { FT_Face face = cmap->cmap.charmap.face; FT_UInt32 result = 0; FT_UInt32 char_code; FT_UInt gindex = 0; FT_Byte* table = cmap->data; FT_Byte* p = table + 8204; FT...
@@ -2968,12 +2968,17 @@ /* through the normal Unicode cmap, no GIDs, just check order) */ if ( defOff != 0 ) { - FT_Byte* defp = table + defOff; - FT_ULong numRanges = TT_NEXT_ULONG( defp ); + FT_Byte* defp = table + defOff; + FT_ULong numRange...
CWE-125
null
null
13,849
T1_Finalize_Parser( T1_Parser parser ) { FT_Memory memory = parser->root.memory; /* always free the private dictionary */ FT_FREE( parser->private_dict ); /* free the base dictionary only when we have a disk stream */ if ( !parser->in_memory ) FT_FREE( parser->base_dict ); parser...
null
0
T1_Finalize_Parser( T1_Parser parser ) { FT_Memory memory = parser->root.memory; /* always free the private dictionary */ FT_FREE( parser->private_dict ); /* free the base dictionary only when we have a disk stream */ if ( !parser->in_memory ) FT_FREE( parser->base_dict ); parser...
@@ -334,7 +334,6 @@ /* first of all, look at the `eexec' keyword */ FT_Byte* cur = parser->base_dict; FT_Byte* limit = cur + parser->base_len; - FT_Byte c; FT_Pointer pos_lf; FT_Bool test_cr; @@ -342,9 +341,9 @@ Again: for (;;) { - c =...
CWE-125
null
null
13,850
T1_New_Parser( T1_Parser parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux ) { FT_Error error; FT_UShort tag; FT_ULong size; psaux->ps_parser_funcs->init( &parser->root, NULL, NULL, memory ); parser->stream ...
null
0
T1_New_Parser( T1_Parser parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux ) { FT_Error error; FT_UShort tag; FT_ULong size; psaux->ps_parser_funcs->init( &parser->root, NULL, NULL, memory ); parser->stream ...
@@ -389,6 +389,15 @@ cur = limit; limit = parser->base_dict + parser->base_len; + + if ( cur >= limit ) + { + FT_ERROR(( "T1_Get_Private_Dict:" + " premature end in private dictionary\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; + ...
CWE-125
null
null
13,851
check_type1_format( FT_Stream stream, const char* header_string, size_t header_length ) { FT_Error error; FT_UShort tag; FT_ULong dummy; if ( FT_STREAM_SEEK( 0 ) ) goto Exit; error = read_pfb_tag( stream, &tag, &dummy ); if ...
null
0
check_type1_format( FT_Stream stream, const char* header_string, size_t header_length ) { FT_Error error; FT_UShort tag; FT_ULong dummy; if ( FT_STREAM_SEEK( 0 ) ) goto Exit; error = read_pfb_tag( stream, &tag, &dummy ); if ...
@@ -389,6 +389,15 @@ cur = limit; limit = parser->base_dict + parser->base_len; + + if ( cur >= limit ) + { + FT_ERROR(( "T1_Get_Private_Dict:" + " premature end in private dictionary\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Exit; + ...
CWE-125
null
null
13,852
_eXosip_is_public_address (const char *c_address) { return (0 != strncmp (c_address, "192.168", 7) && 0 != strncmp (c_address, "10.", 3) && 0 != strncmp (c_address, "172.16.", 7) && 0 != strncmp (c_address, "172.17.", 7) && 0 != strncmp (c_address, "172.18.", 7) && 0 ...
null
0
_eXosip_is_public_address (const char *c_address) { return (0 != strncmp (c_address, "192.168", 7) && 0 != strncmp (c_address, "10.", 3) && 0 != strncmp (c_address, "172.16.", 7) && 0 != strncmp (c_address, "172.17.", 7) && 0 != strncmp (c_address, "172.18.", 7) && 0 ...
@@ -730,6 +730,7 @@ eXosip_init (struct eXosip_t *excontext) excontext->autoanswer_bye = 1; excontext->auto_masquerade_contact = 1; excontext->masquerade_via=0; + excontext->use_ephemeral_port=1; return OSIP_SUCCESS; } @@ -1057,7 +1058,10 @@ eXosip_set_option (struct eXosip_t *excontext, int opt, const ...
CWE-189
null
null
13,853
eXosip_enable_ipv6 (int _ipv6_enable) { /* obsolete, use: eXosip_set_option(excontext, EXOSIP_OPT_ENABLE_IPV6, &val); */ }
null
0
eXosip_enable_ipv6 (int _ipv6_enable) { /* obsolete, use: eXosip_set_option(excontext, EXOSIP_OPT_ENABLE_IPV6, &val); */ }
@@ -730,6 +730,7 @@ eXosip_init (struct eXosip_t *excontext) excontext->autoanswer_bye = 1; excontext->auto_masquerade_contact = 1; excontext->masquerade_via=0; + excontext->use_ephemeral_port=1; return OSIP_SUCCESS; } @@ -1057,7 +1058,10 @@ eXosip_set_option (struct eXosip_t *excontext, int opt, const ...
CWE-189
null
null
13,854
eXosip_find_free_port (struct eXosip_t *excontext, int free_port, int transport) { int res1; int res2; struct addrinfo *addrinfo_rtp = NULL; struct addrinfo *curinfo_rtp; struct addrinfo *addrinfo_rtcp = NULL; struct addrinfo *curinfo_rtcp; int sock; int count; for (count = 0; count < 8; count++) { ...
null
0
eXosip_find_free_port (struct eXosip_t *excontext, int free_port, int transport) { int res1; int res2; struct addrinfo *addrinfo_rtp = NULL; struct addrinfo *curinfo_rtp; struct addrinfo *addrinfo_rtcp = NULL; struct addrinfo *curinfo_rtcp; int sock; int count; for (count = 0; count < 8; count++) { ...
@@ -730,6 +730,7 @@ eXosip_init (struct eXosip_t *excontext) excontext->autoanswer_bye = 1; excontext->auto_masquerade_contact = 1; excontext->masquerade_via=0; + excontext->use_ephemeral_port=1; return OSIP_SUCCESS; } @@ -1057,7 +1058,10 @@ eXosip_set_option (struct eXosip_t *excontext, int opt, const ...
CWE-189
null
null
13,855
eXosip_get_version (void) { return EXOSIP_VERSION; }
null
0
eXosip_get_version (void) { return EXOSIP_VERSION; }
@@ -730,6 +730,7 @@ eXosip_init (struct eXosip_t *excontext) excontext->autoanswer_bye = 1; excontext->auto_masquerade_contact = 1; excontext->masquerade_via=0; + excontext->use_ephemeral_port=1; return OSIP_SUCCESS; } @@ -1057,7 +1058,10 @@ eXosip_set_option (struct eXosip_t *excontext, int opt, const ...
CWE-189
null
null
13,856
eXosip_listen_addr (struct eXosip_t *excontext, int transport, const char *addr, int port, int family, int secure) { int i = -1; if (excontext->eXtl_transport.enabled > 0) { /* already set */ OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL, "eXosip: already listening somewhere\n")); return...
null
0
eXosip_listen_addr (struct eXosip_t *excontext, int transport, const char *addr, int port, int family, int secure) { int i = -1; if (excontext->eXtl_transport.enabled > 0) { /* already set */ OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_ERROR, NULL, "eXosip: already listening somewhere\n")); return...
@@ -730,6 +730,7 @@ eXosip_init (struct eXosip_t *excontext) excontext->autoanswer_bye = 1; excontext->auto_masquerade_contact = 1; excontext->masquerade_via=0; + excontext->use_ephemeral_port=1; return OSIP_SUCCESS; } @@ -1057,7 +1058,10 @@ eXosip_set_option (struct eXosip_t *excontext, int opt, const ...
CWE-189
null
null
13,857
eXosip_malloc (void) { struct eXosip_t *ptr = (struct eXosip_t *) osip_malloc (sizeof (eXosip_t)); if (ptr) memset (ptr, 0, sizeof (eXosip_t)); return ptr; }
null
0
eXosip_malloc (void) { struct eXosip_t *ptr = (struct eXosip_t *) osip_malloc (sizeof (eXosip_t)); if (ptr) memset (ptr, 0, sizeof (eXosip_t)); return ptr; }
@@ -730,6 +730,7 @@ eXosip_init (struct eXosip_t *excontext) excontext->autoanswer_bye = 1; excontext->auto_masquerade_contact = 1; excontext->masquerade_via=0; + excontext->use_ephemeral_port=1; return OSIP_SUCCESS; } @@ -1057,7 +1058,10 @@ eXosip_set_option (struct eXosip_t *excontext, int opt, const ...
CWE-189
null
null
13,858
eXosip_reset_transports (struct eXosip_t *excontext) { int i = OSIP_WRONG_STATE; if (excontext->eXtl_transport.tl_reset) i = excontext->eXtl_transport.tl_reset (excontext); return i; }
null
0
eXosip_reset_transports (struct eXosip_t *excontext) { int i = OSIP_WRONG_STATE; if (excontext->eXtl_transport.tl_reset) i = excontext->eXtl_transport.tl_reset (excontext); return i; }
@@ -730,6 +730,7 @@ eXosip_init (struct eXosip_t *excontext) excontext->autoanswer_bye = 1; excontext->auto_masquerade_contact = 1; excontext->masquerade_via=0; + excontext->use_ephemeral_port=1; return OSIP_SUCCESS; } @@ -1057,7 +1058,10 @@ eXosip_set_option (struct eXosip_t *excontext, int opt, const ...
CWE-189
null
null
13,859
_tcp_tl_check_connected (struct eXosip_t *excontext) { struct eXtltcp *reserved = (struct eXtltcp *) excontext->eXtltcp_reserved; int pos; int res; for (pos = 0; pos < EXOSIP_MAX_SOCKETS; pos++) { if (reserved->socket_tab[pos].invalid > 0) { OSIP_TRACE (osip_trace (__FILE__, __LINE_...
null
0
_tcp_tl_check_connected (struct eXosip_t *excontext) { struct eXtltcp *reserved = (struct eXtltcp *) excontext->eXtltcp_reserved; int pos; int res; for (pos = 0; pos < EXOSIP_MAX_SOCKETS; pos++) { if (reserved->socket_tab[pos].invalid > 0) { OSIP_TRACE (osip_trace (__FILE__, __LINE_...
@@ -416,7 +416,8 @@ handle_messages (struct eXosip_t *excontext, struct _tcp_stream *sockinfo) OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL, "socket %s:%i: message has no content-length: <%s>\n", sockinfo->remote_ip, sockinfo->remote_port, buf)); } clen = clen_header ? atoi (clen_header...
CWE-189
null
null
13,860
_tls_add_certificates (SSL_CTX * ctx) { int count = 0; #ifdef HAVE_WINCRYPT_H PCCERT_CONTEXT pCertCtx; X509 *cert = NULL; HCERTSTORE hStore = CertOpenSystemStore (0, L"CA"); for (pCertCtx = CertEnumCertificatesInStore (hStore, NULL); pCertCtx != NULL; pCertCtx = CertEnumCertificatesInStore (hStore, pCertCtx...
null
0
_tls_add_certificates (SSL_CTX * ctx) { int count = 0; #ifdef HAVE_WINCRYPT_H PCCERT_CONTEXT pCertCtx; X509 *cert = NULL; HCERTSTORE hStore = CertOpenSystemStore (0, L"CA"); for (pCertCtx = CertEnumCertificatesInStore (hStore, NULL); pCertCtx != NULL; pCertCtx = CertEnumCertificatesInStore (hStore, pCertCtx...
@@ -1971,7 +1971,8 @@ handle_messages (struct eXosip_t *excontext, struct _tls_stream *sockinfo) OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL, "socket %s:%i: message has no content-length: <%s>\n", sockinfo->remote_ip, sockinfo->remote_port, buf)); } clen = clen_header ? atoi (clen_head...
CWE-189
null
null
13,861
_tls_set_certificate (SSL_CTX * ctx, const char *cn) { #ifdef HAVE_WINCRYPT_H PCCERT_CONTEXT pCertCtx; X509 *cert = NULL; HCERTSTORE hStore = CertOpenSystemStore (0, L"CA"); for (pCertCtx = CertEnumCertificatesInStore (hStore, NULL); pCertCtx != NULL; pCertCtx = CertEnumCertificatesInStore (hStore, pCertCtx)) ...
null
0
_tls_set_certificate (SSL_CTX * ctx, const char *cn) { #ifdef HAVE_WINCRYPT_H PCCERT_CONTEXT pCertCtx; X509 *cert = NULL; HCERTSTORE hStore = CertOpenSystemStore (0, L"CA"); for (pCertCtx = CertEnumCertificatesInStore (hStore, NULL); pCertCtx != NULL; pCertCtx = CertEnumCertificatesInStore (hStore, pCertCtx)) ...
@@ -1971,7 +1971,8 @@ handle_messages (struct eXosip_t *excontext, struct _tls_stream *sockinfo) OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL, "socket %s:%i: message has no content-length: <%s>\n", sockinfo->remote_ip, sockinfo->remote_port, buf)); } clen = clen_header ? atoi (clen_head...
CWE-189
null
null
13,862
_tls_tl_close_sockinfo (struct _tls_stream *sockinfo) { if (sockinfo->socket > 0) { if (sockinfo->ssl_conn != NULL) { SSL_shutdown (sockinfo->ssl_conn); SSL_shutdown (sockinfo->ssl_conn); SSL_free (sockinfo->ssl_conn); } if (sockinfo->ssl_ctx != NULL) SSL_CTX_free (sockinfo->ssl_ct...
null
0
_tls_tl_close_sockinfo (struct _tls_stream *sockinfo) { if (sockinfo->socket > 0) { if (sockinfo->ssl_conn != NULL) { SSL_shutdown (sockinfo->ssl_conn); SSL_shutdown (sockinfo->ssl_conn); SSL_free (sockinfo->ssl_conn); } if (sockinfo->ssl_ctx != NULL) SSL_CTX_free (sockinfo->ssl_ct...
@@ -1971,7 +1971,8 @@ handle_messages (struct eXosip_t *excontext, struct _tls_stream *sockinfo) OSIP_TRACE (osip_trace (__FILE__, __LINE__, OSIP_INFO1, NULL, "socket %s:%i: message has no content-length: <%s>\n", sockinfo->remote_ip, sockinfo->remote_port, buf)); } clen = clen_header ? atoi (clen_head...
CWE-189
null
null
13,863
static uint64_t get_free_space_available(const char *path) { struct statvfs stat; if (statvfs(path, &stat) != 0) { syslog(LOG_WARNING, "file-xfer: failed to get free space, statvfs error: %s", strerror(errno)); return G_MAXUINT64; } return stat.f_bsize * stat.f_bavail; }
Exec Code
0
static uint64_t get_free_space_available(const char *path) { struct statvfs stat; if (statvfs(path, &stat) != 0) { syslog(LOG_WARNING, "file-xfer: failed to get free space, statvfs error: %s", strerror(errno)); return G_MAXUINT64; } return stat.f_bsize * stat.f_bavail; }
@@ -336,9 +336,16 @@ void vdagent_file_xfers_data(struct vdagent_file_xfers *xfers, if (xfers->open_save_dir && task->file_xfer_nr == task->file_xfer_total && g_hash_table_size(xfers->xfers) == 1) { - char buf[PATH_MAX]; - ...
CWE-78
null
null
13,864
static void vdagent_file_xfer_task_free(gpointer data) { AgentFileXferTask *task = data; g_return_if_fail(task != NULL); if (task->file_fd > 0) { syslog(LOG_ERR, "file-xfer: Removing task %u and file %s due to error", task->id, task->file_name); close(task->file_fd); ...
Exec Code
0
static void vdagent_file_xfer_task_free(gpointer data) { AgentFileXferTask *task = data; g_return_if_fail(task != NULL); if (task->file_fd > 0) { syslog(LOG_ERR, "file-xfer: Removing task %u and file %s due to error", task->id, task->file_name); close(task->file_fd); ...
@@ -336,9 +336,16 @@ void vdagent_file_xfers_data(struct vdagent_file_xfers *xfers, if (xfers->open_save_dir && task->file_xfer_nr == task->file_xfer_total && g_hash_table_size(xfers->xfers) == 1) { - char buf[PATH_MAX]; - ...
CWE-78
null
null
13,865
struct vdagent_file_xfers *vdagent_file_xfers_create( struct udscs_connection *vdagentd, const char *save_dir, int open_save_dir, int debug) { struct vdagent_file_xfers *xfers; xfers = g_malloc(sizeof(*xfers)); xfers->xfers = g_hash_table_new_full(g_direct_hash, g_direct_equal, ...
Exec Code
0
struct vdagent_file_xfers *vdagent_file_xfers_create( struct udscs_connection *vdagentd, const char *save_dir, int open_save_dir, int debug) { struct vdagent_file_xfers *xfers; xfers = g_malloc(sizeof(*xfers)); xfers->xfers = g_hash_table_new_full(g_direct_hash, g_direct_equal, ...
@@ -336,9 +336,16 @@ void vdagent_file_xfers_data(struct vdagent_file_xfers *xfers, if (xfers->open_save_dir && task->file_xfer_nr == task->file_xfer_total && g_hash_table_size(xfers->xfers) == 1) { - char buf[PATH_MAX]; - ...
CWE-78
null
null
13,866
internal_warning (const char *format, ...) #else internal_warning (format, va_alist) const char *format; va_dcl #endif { va_list args; error_prolog (1); fprintf (stderr, _("warning: ")); SH_VA_START (args, format); vfprintf (stderr, format, args); fprintf (stderr, "\n"); va_end (args); }
Exec Code Overflow
0
internal_warning (const char *format, ...) #else internal_warning (format, va_alist) const char *format; va_dcl #endif { va_list args; error_prolog (1); fprintf (stderr, _("warning: ")); SH_VA_START (args, format); vfprintf (stderr, format, args); fprintf (stderr, "\n"); va_end (args); }
@@ -200,7 +200,11 @@ report_error (format, va_alist) va_end (args); if (exit_immediately_on_error) - exit_shell (1); + { + if (last_command_exit_value == 0) + last_command_exit_value = 1; + exit_shell (last_command_exit_value); + } } void
CWE-119
null
null
13,867
itrace (const char *format, ...) #else itrace (format, va_alist) const char *format; va_dcl #endif { va_list args; fprintf(stderr, "TRACE: pid %ld: ", (long)getpid()); SH_VA_START (args, format); vfprintf (stderr, format, args); fprintf (stderr, "\n"); va_end (args); fflush(stderr); }
Exec Code Overflow
0
itrace (const char *format, ...) #else itrace (format, va_alist) const char *format; va_dcl #endif { va_list args; fprintf(stderr, "TRACE: pid %ld: ", (long)getpid()); SH_VA_START (args, format); vfprintf (stderr, format, args); fprintf (stderr, "\n"); va_end (args); fflush(stderr); }
@@ -200,7 +200,11 @@ report_error (format, va_alist) va_end (args); if (exit_immediately_on_error) - exit_shell (1); + { + if (last_command_exit_value == 0) + last_command_exit_value = 1; + exit_shell (last_command_exit_value); + } } void
CWE-119
null
null
13,868
parser_error (int lineno, const char *format, ...) #else parser_error (lineno, format, va_alist) int lineno; const char *format; va_dcl #endif { va_list args; char *ename, *iname; ename = get_name_for_error (); iname = yy_input_name (); if (interactive) fprintf (stderr, "%s: ", ename); ...
Exec Code Overflow
0
parser_error (int lineno, const char *format, ...) #else parser_error (lineno, format, va_alist) int lineno; const char *format; va_dcl #endif { va_list args; char *ename, *iname; ename = get_name_for_error (); iname = yy_input_name (); if (interactive) fprintf (stderr, "%s: ", ename); ...
@@ -200,7 +200,11 @@ report_error (format, va_alist) va_end (args); if (exit_immediately_on_error) - exit_shell (1); + { + if (last_command_exit_value == 0) + last_command_exit_value = 1; + exit_shell (last_command_exit_value); + } } void
CWE-119
null
null
13,869
programming_error (const char *format, ...) #else programming_error (format, va_alist) const char *format; va_dcl #endif { va_list args; char *h; #if defined (JOB_CONTROL) give_terminal_to (shell_pgrp, 0); #endif /* JOB_CONTROL */ SH_VA_START (args, format); vfprintf (stderr, format, args); fpr...
Exec Code Overflow
0
programming_error (const char *format, ...) #else programming_error (format, va_alist) const char *format; va_dcl #endif { va_list args; char *h; #if defined (JOB_CONTROL) give_terminal_to (shell_pgrp, 0); #endif /* JOB_CONTROL */ SH_VA_START (args, format); vfprintf (stderr, format, args); fpr...
@@ -200,7 +200,11 @@ report_error (format, va_alist) va_end (args); if (exit_immediately_on_error) - exit_shell (1); + { + if (last_command_exit_value == 0) + last_command_exit_value = 1; + exit_shell (last_command_exit_value); + } } void
CWE-119
null
null
13,870
sys_error (const char *format, ...) #else sys_error (format, va_alist) const char *format; va_dcl #endif { int e; va_list args; e = errno; error_prolog (0); SH_VA_START (args, format); vfprintf (stderr, format, args); fprintf (stderr, ": %s\n", strerror (e)); va_end (args); }
Exec Code Overflow
0
sys_error (const char *format, ...) #else sys_error (format, va_alist) const char *format; va_dcl #endif { int e; va_list args; e = errno; error_prolog (0); SH_VA_START (args, format); vfprintf (stderr, format, args); fprintf (stderr, ": %s\n", strerror (e)); va_end (args); }
@@ -200,7 +200,11 @@ report_error (format, va_alist) va_end (args); if (exit_immediately_on_error) - exit_shell (1); + { + if (last_command_exit_value == 0) + last_command_exit_value = 1; + exit_shell (last_command_exit_value); + } } void
CWE-119
null
null
13,871
trace (const char *format, ...) #else trace (format, va_alist) const char *format; va_dcl #endif { va_list args; static FILE *tracefp = (FILE *)NULL; if (tracefp == NULL) tracefp = fopen("/tmp/bash-trace.log", "a+"); if (tracefp == NULL) tracefp = stderr; else fcntl (fileno (tracefp), ...
Exec Code Overflow
0
trace (const char *format, ...) #else trace (format, va_alist) const char *format; va_dcl #endif { va_list args; static FILE *tracefp = (FILE *)NULL; if (tracefp == NULL) tracefp = fopen("/tmp/bash-trace.log", "a+"); if (tracefp == NULL) tracefp = stderr; else fcntl (fileno (tracefp), ...
@@ -200,7 +200,11 @@ report_error (format, va_alist) va_end (args); if (exit_immediately_on_error) - exit_shell (1); + { + if (last_command_exit_value == 0) + last_command_exit_value = 1; + exit_shell (last_command_exit_value); + } } void
CWE-119
null
null
13,872
close_all_files () { register int i, fd_table_size; fd_table_size = getdtablesize (); if (fd_table_size > 256) /* clamp to a reasonable value */ fd_table_size = 256; for (i = 3; i < fd_table_size; i++) close (i); }
Exec Code Overflow
0
close_all_files () { register int i, fd_table_size; fd_table_size = getdtablesize (); if (fd_table_size > 256) /* clamp to a reasonable value */ fd_table_size = 256; for (i = 3; i < fd_table_size; i++) close (i); }
@@ -2370,7 +2370,9 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) unfreeze_jobs_list (); } +#if defined (JOB_CONTROL) discard_unwind_frame ("lastpipe-exec"); +#endif return (exec_result); }
CWE-119
null
null
13,873
coproc_closeall () { #if MULTIPLE_COPROCS cpl_closeall (); #else coproc_close (&sh_coproc); /* XXX - will require changes for multiple coprocs */ #endif }
Exec Code Overflow
0
coproc_closeall () { #if MULTIPLE_COPROCS cpl_closeall (); #else coproc_close (&sh_coproc); /* XXX - will require changes for multiple coprocs */ #endif }
@@ -2370,7 +2370,9 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) unfreeze_jobs_list (); } +#if defined (JOB_CONTROL) discard_unwind_frame ("lastpipe-exec"); +#endif return (exec_result); }
CWE-119
null
null
13,874
coproc_flush () { #if MULTIPLE_COPROCS cpl_flush (); #else coproc_dispose (&sh_coproc); #endif }
Exec Code Overflow
0
coproc_flush () { #if MULTIPLE_COPROCS cpl_flush (); #else coproc_dispose (&sh_coproc); #endif }
@@ -2370,7 +2370,9 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) unfreeze_jobs_list (); } +#if defined (JOB_CONTROL) discard_unwind_frame ("lastpipe-exec"); +#endif return (exec_result); }
CWE-119
null
null
13,875
coproc_reap () { #if MULTIPLE_COPROCS cpl_reap (); #else struct coproc *cp; cp = &sh_coproc; /* XXX - will require changes for multiple coprocs */ if (cp && (cp->c_flags & COPROC_DEAD)) coproc_dispose (cp); #endif }
Exec Code Overflow
0
coproc_reap () { #if MULTIPLE_COPROCS cpl_reap (); #else struct coproc *cp; cp = &sh_coproc; /* XXX - will require changes for multiple coprocs */ if (cp && (cp->c_flags & COPROC_DEAD)) coproc_dispose (cp); #endif }
@@ -2370,7 +2370,9 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) unfreeze_jobs_list (); } +#if defined (JOB_CONTROL) discard_unwind_frame ("lastpipe-exec"); +#endif return (exec_result); }
CWE-119
null
null
13,876
cpl_closeall () { struct cpelement *cpe; for (cpe = coproc_list.head; cpe; cpe = cpe->next) coproc_close (cpe->coproc); }
Exec Code Overflow
0
cpl_closeall () { struct cpelement *cpe; for (cpe = coproc_list.head; cpe; cpe = cpe->next) coproc_close (cpe->coproc); }
@@ -2370,7 +2370,9 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) unfreeze_jobs_list (); } +#if defined (JOB_CONTROL) discard_unwind_frame ("lastpipe-exec"); +#endif return (exec_result); }
CWE-119
null
null
13,877
cpl_flush () { struct cpelement *cpe, *p; for (cpe = coproc_list.head; cpe; ) { p = cpe; cpe = cpe->next; coproc_dispose (p->coproc); cpe_dispose (p); } coproc_list.head = coproc_list.tail = 0; coproc_list.ncoproc = 0; }
Exec Code Overflow
0
cpl_flush () { struct cpelement *cpe, *p; for (cpe = coproc_list.head; cpe; ) { p = cpe; cpe = cpe->next; coproc_dispose (p->coproc); cpe_dispose (p); } coproc_list.head = coproc_list.tail = 0; coproc_list.ncoproc = 0; }
@@ -2370,7 +2370,9 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) unfreeze_jobs_list (); } +#if defined (JOB_CONTROL) discard_unwind_frame ("lastpipe-exec"); +#endif return (exec_result); }
CWE-119
null
null
13,878
cpl_reap () { struct cpelement *p, *next, *nh, *nt; /* Build a new list by removing dead coprocs and fix up the coproc_list pointers when done. */ nh = nt = next = (struct cpelement *)0; for (p = coproc_list.head; p; p = next) { next = p->next; if (p->coproc->c_flags & COPROC_DEAD) { c...
Exec Code Overflow
0
cpl_reap () { struct cpelement *p, *next, *nh, *nt; /* Build a new list by removing dead coprocs and fix up the coproc_list pointers when done. */ nh = nt = next = (struct cpelement *)0; for (p = coproc_list.head; p; p = next) { next = p->next; if (p->coproc->c_flags & COPROC_DEAD) { c...
@@ -2370,7 +2370,9 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) unfreeze_jobs_list (); } +#if defined (JOB_CONTROL) discard_unwind_frame ("lastpipe-exec"); +#endif return (exec_result); }
CWE-119
null
null
13,879
dispose_exec_redirects () { if (exec_redirection_undo_list) { dispose_redirects (exec_redirection_undo_list); exec_redirection_undo_list = (REDIRECT *)NULL; } }
Exec Code Overflow
0
dispose_exec_redirects () { if (exec_redirection_undo_list) { dispose_redirects (exec_redirection_undo_list); exec_redirection_undo_list = (REDIRECT *)NULL; } }
@@ -2370,7 +2370,9 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) unfreeze_jobs_list (); } +#if defined (JOB_CONTROL) discard_unwind_frame ("lastpipe-exec"); +#endif return (exec_result); }
CWE-119
null
null
13,880
executing_line_number () { if (executing && showing_function_line == 0 && (variable_context == 0 || interactive_shell == 0) && currently_executing_command) { #if defined (COND_COMMAND) if (currently_executing_command->type == cm_cond) return currently_executing_command->value.Cond->line; #endif...
Exec Code Overflow
0
executing_line_number () { if (executing && showing_function_line == 0 && (variable_context == 0 || interactive_shell == 0) && currently_executing_command) { #if defined (COND_COMMAND) if (currently_executing_command->type == cm_cond) return currently_executing_command->value.Cond->line; #endif...
@@ -2370,7 +2370,9 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) unfreeze_jobs_list (); } +#if defined (JOB_CONTROL) discard_unwind_frame ("lastpipe-exec"); +#endif return (exec_result); }
CWE-119
null
null
13,881
initialize_subshell () { #if defined (ALIAS) /* Forget about any aliases that we knew of. We are in a subshell. */ delete_all_aliases (); #endif /* ALIAS */ #if defined (HISTORY) /* Forget about the history lines we have read. This is a non-interactive subshell. */ history_lines_this_session = 0; #endif...
Exec Code Overflow
0
initialize_subshell () { #if defined (ALIAS) /* Forget about any aliases that we knew of. We are in a subshell. */ delete_all_aliases (); #endif /* ALIAS */ #if defined (HISTORY) /* Forget about the history lines we have read. This is a non-interactive subshell. */ history_lines_this_session = 0; #endif...
@@ -2370,7 +2370,9 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) unfreeze_jobs_list (); } +#if defined (JOB_CONTROL) discard_unwind_frame ("lastpipe-exec"); +#endif return (exec_result); }
CWE-119
null
null
13,882
open_files () { register int i; int f, fd_table_size; fd_table_size = getdtablesize (); fprintf (stderr, "pid %ld open files:", (long)getpid ()); for (i = 3; i < fd_table_size; i++) { if ((f = fcntl (i, F_GETFD, 0)) != -1) fprintf (stderr, " %d (%s)", i, f ? "close" : "open"); } fprintf (st...
Exec Code Overflow
0
open_files () { register int i; int f, fd_table_size; fd_table_size = getdtablesize (); fprintf (stderr, "pid %ld open files:", (long)getpid ()); for (i = 3; i < fd_table_size; i++) { if ((f = fcntl (i, F_GETFD, 0)) != -1) fprintf (stderr, " %d (%s)", i, f ? "close" : "open"); } fprintf (st...
@@ -2370,7 +2370,9 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) unfreeze_jobs_list (); } +#if defined (JOB_CONTROL) discard_unwind_frame ("lastpipe-exec"); +#endif return (exec_result); }
CWE-119
null
null
13,883
setup_async_signals () { #if defined (__BEOS__) set_signal_handler (SIGHUP, SIG_IGN); /* they want csh-like behavior */ #endif #if defined (JOB_CONTROL) if (job_control == 0) #endif { set_signal_handler (SIGINT, SIG_IGN); set_signal_ignored (SIGINT); set_signal_handler (SIGQUIT, SIG_IGN); ...
Exec Code Overflow
0
setup_async_signals () { #if defined (__BEOS__) set_signal_handler (SIGHUP, SIG_IGN); /* they want csh-like behavior */ #endif #if defined (JOB_CONTROL) if (job_control == 0) #endif { set_signal_handler (SIGINT, SIG_IGN); set_signal_ignored (SIGINT); set_signal_handler (SIGQUIT, SIG_IGN); ...
@@ -2370,7 +2370,9 @@ execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) unfreeze_jobs_list (); } +#if defined (JOB_CONTROL) discard_unwind_frame ("lastpipe-exec"); +#endif return (exec_result); }
CWE-119
null
null
13,884
locale_setblanks () { int x; for (x = 0; x < sh_syntabsiz; x++) { if (isblank (x)) sh_syntaxtab[x] |= CSHBRK|CBLANK; else if (member (x, shell_break_chars)) { sh_syntaxtab[x] |= CSHBRK; sh_syntaxtab[x] &= ~CBLANK; } else sh_syntaxtab[x] &= ~(CSHBRK|CBLANK); } }
Exec Code Overflow
0
locale_setblanks () { int x; for (x = 0; x < sh_syntabsiz; x++) { if (isblank (x)) sh_syntaxtab[x] |= CSHBRK|CBLANK; else if (member (x, shell_break_chars)) { sh_syntaxtab[x] |= CSHBRK; sh_syntaxtab[x] &= ~CBLANK; } else sh_syntaxtab[x] &= ~(CSHBRK|CBLANK); } }
@@ -1,6 +1,6 @@ /* locale.c - Miscellaneous internationalization functions. */ -/* Copyright (C) 1996-2009 Free Software Foundation, Inc. +/* Copyright (C) 1996-2009,2012 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell.
CWE-119
null
null
13,885
reset_locale_vars () { char *t; #if defined (HAVE_SETLOCALE) if (lang == 0 || *lang == '\0') maybe_make_export_env (); /* trust that this will change environment for setlocale */ if (setlocale (LC_ALL, lang ? lang : "") == 0) return 0; # if defined (LC_CTYPE) t = setlocale (LC_CTYPE, get_locale_var (...
Exec Code Overflow
0
reset_locale_vars () { char *t; #if defined (HAVE_SETLOCALE) if (lang == 0 || *lang == '\0') maybe_make_export_env (); /* trust that this will change environment for setlocale */ if (setlocale (LC_ALL, lang ? lang : "") == 0) return 0; # if defined (LC_CTYPE) t = setlocale (LC_CTYPE, get_locale_var (...
@@ -1,6 +1,6 @@ /* locale.c - Miscellaneous internationalization functions. */ -/* Copyright (C) 1996-2009 Free Software Foundation, Inc. +/* Copyright (C) 1996-2009,2012 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell.
CWE-119
null
null
13,886
set_default_locale () { #if defined (HAVE_SETLOCALE) default_locale = setlocale (LC_ALL, ""); if (default_locale) default_locale = savestring (default_locale); #endif /* HAVE_SETLOCALE */ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); locale_mb_cur_max = MB_CUR_MAX; }
Exec Code Overflow
0
set_default_locale () { #if defined (HAVE_SETLOCALE) default_locale = setlocale (LC_ALL, ""); if (default_locale) default_locale = savestring (default_locale); #endif /* HAVE_SETLOCALE */ bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); locale_mb_cur_max = MB_CUR_MAX; }
@@ -1,6 +1,6 @@ /* locale.c - Miscellaneous internationalization functions. */ -/* Copyright (C) 1996-2009 Free Software Foundation, Inc. +/* Copyright (C) 1996-2009,2012 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell.
CWE-119
null
null
13,887
set_default_locale_vars () { char *val; #if defined (HAVE_SETLOCALE) # if defined (LC_CTYPE) val = get_string_value ("LC_CTYPE"); if (val == 0 && lc_all && *lc_all) { setlocale (LC_CTYPE, lc_all); locale_setblanks (); locale_mb_cur_max = MB_CUR_MAX; u32reset (); } # endif # i...
Exec Code Overflow
0
set_default_locale_vars () { char *val; #if defined (HAVE_SETLOCALE) # if defined (LC_CTYPE) val = get_string_value ("LC_CTYPE"); if (val == 0 && lc_all && *lc_all) { setlocale (LC_CTYPE, lc_all); locale_setblanks (); locale_mb_cur_max = MB_CUR_MAX; u32reset (); } # endif # i...
@@ -1,6 +1,6 @@ /* locale.c - Miscellaneous internationalization functions. */ -/* Copyright (C) 1996-2009 Free Software Foundation, Inc. +/* Copyright (C) 1996-2009,2012 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell.
CWE-119
null
null
13,888
all_array_variables () { return (vapply (visible_array_vars)); }
Exec Code Overflow
0
all_array_variables () { return (vapply (visible_array_vars)); }
@@ -4666,12 +4666,18 @@ sv_locale (name) char *name; { char *v; + int r; v = get_string_value (name); if (name[0] == 'L' && name[1] == 'A') /* LANG */ - set_lang (name, v); + r = set_lang (name, v); else - set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */ + r = set_locale_var (name, v...
CWE-119
null
null
13,889
all_exported_variables () { return (vapply (visible_and_exported)); }
Exec Code Overflow
0
all_exported_variables () { return (vapply (visible_and_exported)); }
@@ -4666,12 +4666,18 @@ sv_locale (name) char *name; { char *v; + int r; v = get_string_value (name); if (name[0] == 'L' && name[1] == 'A') /* LANG */ - set_lang (name, v); + r = set_lang (name, v); else - set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */ + r = set_locale_var (name, v...
CWE-119
null
null
13,890
all_local_variables () { VARLIST *vlist; SHELL_VAR **ret; VAR_CONTEXT *vc; vc = shell_variables; for (vc = shell_variables; vc; vc = vc->down) if (vc_isfuncenv (vc) && vc->scope == variable_context) break; if (vc == 0) { internal_error (_("all_local_variables: no function context at cu...
Exec Code Overflow
0
all_local_variables () { VARLIST *vlist; SHELL_VAR **ret; VAR_CONTEXT *vc; vc = shell_variables; for (vc = shell_variables; vc; vc = vc->down) if (vc_isfuncenv (vc) && vc->scope == variable_context) break; if (vc == 0) { internal_error (_("all_local_variables: no function context at cu...
@@ -4666,12 +4666,18 @@ sv_locale (name) char *name; { char *v; + int r; v = get_string_value (name); if (name[0] == 'L' && name[1] == 'A') /* LANG */ - set_lang (name, v); + r = set_lang (name, v); else - set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */ + r = set_locale_var (name, v...
CWE-119
null
null
13,891
all_shell_functions () { return (fapply ((sh_var_map_func_t *)NULL)); }
Exec Code Overflow
0
all_shell_functions () { return (fapply ((sh_var_map_func_t *)NULL)); }
@@ -4666,12 +4666,18 @@ sv_locale (name) char *name; { char *v; + int r; v = get_string_value (name); if (name[0] == 'L' && name[1] == 'A') /* LANG */ - set_lang (name, v); + r = set_lang (name, v); else - set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */ + r = set_locale_var (name, v...
CWE-119
null
null
13,892
all_visible_functions () { return (fapply (visible_var)); }
Exec Code Overflow
0
all_visible_functions () { return (fapply (visible_var)); }
@@ -4666,12 +4666,18 @@ sv_locale (name) char *name; { char *v; + int r; v = get_string_value (name); if (name[0] == 'L' && name[1] == 'A') /* LANG */ - set_lang (name, v); + r = set_lang (name, v); else - set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */ + r = set_locale_var (name, v...
CWE-119
null
null
13,893
brand () { /* From "Random number generators: good ones are hard to find", Park and Miller, Communications of the ACM, vol. 31, no. 10, October 1988, p. 1195. filtered through FreeBSD */ long h, l; /* Can't seed with 0. */ if (rseed == 0) rseed = 123459876; h = rseed / 127773; l = rseed % 127...
Exec Code Overflow
0
brand () { /* From "Random number generators: good ones are hard to find", Park and Miller, Communications of the ACM, vol. 31, no. 10, October 1988, p. 1195. filtered through FreeBSD */ long h, l; /* Can't seed with 0. */ if (rseed == 0) rseed = 123459876; h = rseed / 127773; l = rseed % 127...
@@ -4666,12 +4666,18 @@ sv_locale (name) char *name; { char *v; + int r; v = get_string_value (name); if (name[0] == 'L' && name[1] == 'A') /* LANG */ - set_lang (name, v); + r = set_lang (name, v); else - set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */ + r = set_locale_var (name, v...
CWE-119
null
null
13,894
create_variable_tables () { if (shell_variables == 0) { shell_variables = global_variables = new_var_context ((char *)NULL, 0); shell_variables->scope = 0; shell_variables->table = hash_create (0); } if (shell_functions == 0) shell_functions = hash_create (0); #if defined (DEBUGGER) ...
Exec Code Overflow
0
create_variable_tables () { if (shell_variables == 0) { shell_variables = global_variables = new_var_context ((char *)NULL, 0); shell_variables->scope = 0; shell_variables->table = hash_create (0); } if (shell_functions == 0) shell_functions = hash_create (0); #if defined (DEBUGGER) ...
@@ -4666,12 +4666,18 @@ sv_locale (name) char *name; { char *v; + int r; v = get_string_value (name); if (name[0] == 'L' && name[1] == 'A') /* LANG */ - set_lang (name, v); + r = set_lang (name, v); else - set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */ + r = set_locale_var (name, v...
CWE-119
null
null
13,895
dispose_saved_dollar_vars () { if (!dollar_arg_stack || dollar_arg_stack_index == 0) return; dispose_words (dollar_arg_stack[dollar_arg_stack_index]); dollar_arg_stack[dollar_arg_stack_index] = (WORD_LIST *)NULL; }
Exec Code Overflow
0
dispose_saved_dollar_vars () { if (!dollar_arg_stack || dollar_arg_stack_index == 0) return; dispose_words (dollar_arg_stack[dollar_arg_stack_index]); dollar_arg_stack[dollar_arg_stack_index] = (WORD_LIST *)NULL; }
@@ -4666,12 +4666,18 @@ sv_locale (name) char *name; { char *v; + int r; v = get_string_value (name); if (name[0] == 'L' && name[1] == 'A') /* LANG */ - set_lang (name, v); + r = set_lang (name, v); else - set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */ + r = set_locale_var (name, v...
CWE-119
null
null
13,896
dispose_used_env_vars () { if (temporary_env) { dispose_temporary_env (propagate_temp_var); maybe_make_export_env (); } }
Exec Code Overflow
0
dispose_used_env_vars () { if (temporary_env) { dispose_temporary_env (propagate_temp_var); maybe_make_export_env (); } }
@@ -4666,12 +4666,18 @@ sv_locale (name) char *name; { char *v; + int r; v = get_string_value (name); if (name[0] == 'L' && name[1] == 'A') /* LANG */ - set_lang (name, v); + r = set_lang (name, v); else - set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */ + r = set_locale_var (name, v...
CWE-119
null
null
13,897
get_bash_name () { char *name; if ((login_shell == 1) && RELPATH(shell_name)) { if (current_user.shell == 0) get_current_user_info (); name = savestring (current_user.shell); } else if (ABSPATH(shell_name)) name = savestring (shell_name); else if (shell_name[0] == '.' && shell_name[1] ...
Exec Code Overflow
0
get_bash_name () { char *name; if ((login_shell == 1) && RELPATH(shell_name)) { if (current_user.shell == 0) get_current_user_info (); name = savestring (current_user.shell); } else if (ABSPATH(shell_name)) name = savestring (shell_name); else if (shell_name[0] == '.' && shell_name[1] ...
@@ -4666,12 +4666,18 @@ sv_locale (name) char *name; { char *v; + int r; v = get_string_value (name); if (name[0] == 'L' && name[1] == 'A') /* LANG */ - set_lang (name, v); + r = set_lang (name, v); else - set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */ + r = set_locale_var (name, v...
CWE-119
null
null
13,898
get_random_number () { int rv, pid; /* Reset for command and process substitution. */ pid = getpid (); if (subshell_environment && seeded_subshell != pid) { seedrand (); seeded_subshell = pid; } do rv = brand (); while (rv == last_random_value); return rv; }
Exec Code Overflow
0
get_random_number () { int rv, pid; /* Reset for command and process substitution. */ pid = getpid (); if (subshell_environment && seeded_subshell != pid) { seedrand (); seeded_subshell = pid; } do rv = brand (); while (rv == last_random_value); return rv; }
@@ -4666,12 +4666,18 @@ sv_locale (name) char *name; { char *v; + int r; v = get_string_value (name); if (name[0] == 'L' && name[1] == 'A') /* LANG */ - set_lang (name, v); + r = set_lang (name, v); else - set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */ + r = set_locale_var (name, v...
CWE-119
null
null
13,899
init_funcname_var () { SHELL_VAR *v; v = find_variable ("FUNCNAME"); if (v) return v; #if defined (ARRAY_VARS) INIT_DYNAMIC_ARRAY_VAR ("FUNCNAME", get_funcname, null_array_assign); #else INIT_DYNAMIC_VAR ("FUNCNAME", (char *)NULL, get_funcname, null_assign); #endif VSETATTR (v, att_invisible|att_noassi...
Exec Code Overflow
0
init_funcname_var () { SHELL_VAR *v; v = find_variable ("FUNCNAME"); if (v) return v; #if defined (ARRAY_VARS) INIT_DYNAMIC_ARRAY_VAR ("FUNCNAME", get_funcname, null_array_assign); #else INIT_DYNAMIC_VAR ("FUNCNAME", (char *)NULL, get_funcname, null_assign); #endif VSETATTR (v, att_invisible|att_noassi...
@@ -4666,12 +4666,18 @@ sv_locale (name) char *name; { char *v; + int r; v = get_string_value (name); if (name[0] == 'L' && name[1] == 'A') /* LANG */ - set_lang (name, v); + r = set_lang (name, v); else - set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */ + r = set_locale_var (name, v...
CWE-119
null
null