idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
5,700 | tt_face_get_location( TT_Face face,
FT_UInt gindex,
FT_UInt *asize )
{
FT_ULong pos1, pos2;
FT_Byte* p;
FT_Byte* p_limit;
pos1 = pos2 = 0;
if ( gindex < face->num_locations )
{
if ( face->header.Index_To_Loc_Format != 0 )
... | DoS | 0 | tt_face_get_location( TT_Face face,
FT_UInt gindex,
FT_UInt *asize )
{
FT_ULong pos1, pos2;
FT_Byte* p;
FT_Byte* p_limit;
pos1 = pos2 = 0;
if ( gindex < face->num_locations )
{
if ( face->header.Index_To_Loc_Format != 0 )
... | @@ -508,9 +508,9 @@
record_size = FT_NEXT_ULONG( p );
/* The maximum number of bytes in an hdmx device record is the */
- /* maximum number of glyphs + 2; this is 0xFFFF + 2; this is */
- /* the reason why `record_size' is a long (which we read as */
- /* unsigned long for convenience). In pr... | CWE-125 | null | null |
5,701 | tt_face_load_cvt( TT_Face face,
FT_Stream stream )
{
#ifdef TT_USE_BYTECODE_INTERPRETER
FT_Error error;
FT_Memory memory = stream->memory;
FT_ULong table_len;
FT_TRACE2(( "CVT " ));
error = face->goto_table( face, TTAG_cvt, stream, &table_len );
if ( error )
... | DoS | 0 | tt_face_load_cvt( TT_Face face,
FT_Stream stream )
{
#ifdef TT_USE_BYTECODE_INTERPRETER
FT_Error error;
FT_Memory memory = stream->memory;
FT_ULong table_len;
FT_TRACE2(( "CVT " ));
error = face->goto_table( face, TTAG_cvt, stream, &table_len );
if ( error )
... | @@ -508,9 +508,9 @@
record_size = FT_NEXT_ULONG( p );
/* The maximum number of bytes in an hdmx device record is the */
- /* maximum number of glyphs + 2; this is 0xFFFF + 2; this is */
- /* the reason why `record_size' is a long (which we read as */
- /* unsigned long for convenience). In pr... | CWE-125 | null | null |
5,702 | tt_face_load_loca( TT_Face face,
FT_Stream stream )
{
FT_Error error;
FT_ULong table_len;
FT_Int shift;
/* we need the size of the `glyf' table for malformed `loca' tables */
error = face->goto_table( face, TTAG_glyf, stream, &face->glyf_len );
/* it is possi... | DoS | 0 | tt_face_load_loca( TT_Face face,
FT_Stream stream )
{
FT_Error error;
FT_ULong table_len;
FT_Int shift;
/* we need the size of the `glyf' table for malformed `loca' tables */
error = face->goto_table( face, TTAG_glyf, stream, &face->glyf_len );
/* it is possi... | @@ -508,9 +508,9 @@
record_size = FT_NEXT_ULONG( p );
/* The maximum number of bytes in an hdmx device record is the */
- /* maximum number of glyphs + 2; this is 0xFFFF + 2; this is */
- /* the reason why `record_size' is a long (which we read as */
- /* unsigned long for convenience). In pr... | CWE-125 | null | null |
5,703 | static int aesni_cbc_hmac_sha1_init_key(EVP_CIPHER_CTX *ctx,
const unsigned char *inkey,
const unsigned char *iv, int enc)
{
EVP_AES_HMAC_SHA1 *key = data(ctx);
int ret;
if (enc)
ret=aesni_set_encrypt_key(inkey,ctx->key_len*8,&key->ks);
else
ret=aesni_set_decrypt_key(inkey,ctx->key_len*8,&key->ks);
SH... | DoS | 0 | static int aesni_cbc_hmac_sha1_init_key(EVP_CIPHER_CTX *ctx,
const unsigned char *inkey,
const unsigned char *iv, int enc)
{
EVP_AES_HMAC_SHA1 *key = data(ctx);
int ret;
if (enc)
ret=aesni_set_encrypt_key(inkey,ctx->key_len*8,&key->ks);
else
ret=aesni_set_decrypt_key(inkey,ctx->key_len*8,&key->ks);
SH... | @@ -1,5 +1,5 @@
/* ====================================================================
- * Copyright (c) 2011 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 2011-2013 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, a... | CWE-310 | null | null |
5,704 | static unsigned char constant_time_eq_8(unsigned char a, unsigned char b)
{
unsigned c = a ^ b;
c--;
return DUPLICATE_MSB_TO_ALL_8(c);
}
| DoS | 0 | static unsigned char constant_time_eq_8(unsigned char a, unsigned char b)
{
unsigned c = a ^ b;
c--;
return DUPLICATE_MSB_TO_ALL_8(c);
}
| @@ -150,6 +150,21 @@ int tls1_cbc_remove_padding(const SSL* s,
if (overhead > rec->length)
return 0;
+ /* We can always safely skip the explicit IV. We check at the beginning
+ * of this function that the record has at least enough space for the
+ * IV, MAC and padding leng... | CWE-310 | null | null |
5,705 | static unsigned constant_time_ge(unsigned a, unsigned b)
{
a -= b;
return DUPLICATE_MSB_TO_ALL(~a);
}
| DoS | 0 | static unsigned constant_time_ge(unsigned a, unsigned b)
{
a -= b;
return DUPLICATE_MSB_TO_ALL(~a);
}
| @@ -150,6 +150,21 @@ int tls1_cbc_remove_padding(const SSL* s,
if (overhead > rec->length)
return 0;
+ /* We can always safely skip the explicit IV. We check at the beginning
+ * of this function that the record has at least enough space for the
+ * IV, MAC and padding leng... | CWE-310 | null | null |
5,706 | int ssl3_cbc_remove_padding(const SSL* s,
SSL3_RECORD *rec,
unsigned block_size,
unsigned mac_size)
{
unsigned padding_length, good;
const unsigned overhead = 1 /* padding length byte */ + mac_size;
/* These lengths are all public so we can test them in non-constant
* time. */
if (overhead ... | DoS | 0 | int ssl3_cbc_remove_padding(const SSL* s,
SSL3_RECORD *rec,
unsigned block_size,
unsigned mac_size)
{
unsigned padding_length, good;
const unsigned overhead = 1 /* padding length byte */ + mac_size;
/* These lengths are all public so we can test them in non-constant
* time. */
if (overhead ... | @@ -150,6 +150,21 @@ int tls1_cbc_remove_padding(const SSL* s,
if (overhead > rec->length)
return 0;
+ /* We can always safely skip the explicit IV. We check at the beginning
+ * of this function that the record has at least enough space for the
+ * IV, MAC and padding leng... | CWE-310 | null | null |
5,707 | Private() {}
| +Priv | 0 | Private() {}
| @@ -54,6 +54,11 @@ void AuthBackend::setCapabilities(AuthBackend::Capabilities capabilities)
d->capabilities = capabilities;
}
+AuthBackend::ExtraCallerIDVerificationMethod AuthBackend::extraCallerIDVerificationMethod() const
+{
+ return NoExtraCallerIDVerificationMethod;
+}
+
bool AuthBackend::actionExists... | CWE-290 | null | null |
5,708 | bool AuthBackend::actionExists(const QString &action)
{
Q_UNUSED(action);
Q_UNUSED(action)
Q_UNUSED(parent)
}
| +Priv | 0 | bool AuthBackend::actionExists(const QString &action)
{
Q_UNUSED(action);
Q_UNUSED(action)
Q_UNUSED(parent)
}
| @@ -54,6 +54,11 @@ void AuthBackend::setCapabilities(AuthBackend::Capabilities capabilities)
d->capabilities = capabilities;
}
+AuthBackend::ExtraCallerIDVerificationMethod AuthBackend::extraCallerIDVerificationMethod() const
+{
+ return NoExtraCallerIDVerificationMethod;
+}
+
bool AuthBackend::actionExists... | CWE-290 | null | null |
5,709 | AuthBackend::Capabilities AuthBackend::capabilities() const
{
return d->capabilities;
}
| +Priv | 0 | AuthBackend::Capabilities AuthBackend::capabilities() const
{
return d->capabilities;
}
| @@ -54,6 +54,11 @@ void AuthBackend::setCapabilities(AuthBackend::Capabilities capabilities)
d->capabilities = capabilities;
}
+AuthBackend::ExtraCallerIDVerificationMethod AuthBackend::extraCallerIDVerificationMethod() const
+{
+ return NoExtraCallerIDVerificationMethod;
+}
+
bool AuthBackend::actionExists... | CWE-290 | null | null |
5,710 | virtual ~Private() {}
| +Priv | 0 | virtual ~Private() {}
| @@ -54,6 +54,11 @@ void AuthBackend::setCapabilities(AuthBackend::Capabilities capabilities)
d->capabilities = capabilities;
}
+AuthBackend::ExtraCallerIDVerificationMethod AuthBackend::extraCallerIDVerificationMethod() const
+{
+ return NoExtraCallerIDVerificationMethod;
+}
+
bool AuthBackend::actionExists... | CWE-290 | null | null |
5,711 | DBusHelperProxy::DBusHelperProxy()
: responder(nullptr)
, m_stopRequest(false)
, m_busConnection(QDBusConnection::systemBus())
{
}
| +Priv | 0 | DBusHelperProxy::DBusHelperProxy()
: responder(nullptr)
, m_stopRequest(false)
, m_busConnection(QDBusConnection::systemBus())
{
}
| @@ -235,6 +235,29 @@ bool DBusHelperProxy::hasToStopAction()
return m_stopRequest;
}
+bool DBusHelperProxy::isCallerAuthorized(const QString &action, const QByteArray &callerID)
+{
+ // Check the caller is really who it says it is
+ switch (BackendsManager::authBackend()->extraCallerIDVerificationMethod()... | CWE-290 | null | null |
5,712 | DBusHelperProxy::DBusHelperProxy(const QDBusConnection &busConnection)
: responder(nullptr)
, m_stopRequest(false)
, m_busConnection(busConnection)
{
}
| +Priv | 0 | DBusHelperProxy::DBusHelperProxy(const QDBusConnection &busConnection)
: responder(nullptr)
, m_stopRequest(false)
, m_busConnection(busConnection)
{
}
| @@ -235,6 +235,29 @@ bool DBusHelperProxy::hasToStopAction()
return m_stopRequest;
}
+bool DBusHelperProxy::isCallerAuthorized(const QString &action, const QByteArray &callerID)
+{
+ // Check the caller is really who it says it is
+ switch (BackendsManager::authBackend()->extraCallerIDVerificationMethod()... | CWE-290 | null | null |
5,713 | Action::AuthStatus DBusHelperProxy::authorizeAction(const QString &action, const QString &helperID)
{
if (!m_actionsInProgress.isEmpty()) {
return Action::ErrorStatus;
}
m_busConnection.interface()->startService(helperID);
QDBusMessage message;
message = QDBusMessage::createMethodCall(help... | +Priv | 0 | Action::AuthStatus DBusHelperProxy::authorizeAction(const QString &action, const QString &helperID)
{
if (!m_actionsInProgress.isEmpty()) {
return Action::ErrorStatus;
}
m_busConnection.interface()->startService(helperID);
QDBusMessage message;
message = QDBusMessage::createMethodCall(help... | @@ -235,6 +235,29 @@ bool DBusHelperProxy::hasToStopAction()
return m_stopRequest;
}
+bool DBusHelperProxy::isCallerAuthorized(const QString &action, const QByteArray &callerID)
+{
+ // Check the caller is really who it says it is
+ switch (BackendsManager::authBackend()->extraCallerIDVerificationMethod()... | CWE-290 | null | null |
5,714 | void DBusHelperProxy::executeAction(const QString &action, const QString &helperID, const QVariantMap &arguments, int timeout)
{
QByteArray blob;
{
QDataStream stream(&blob, QIODevice::WriteOnly);
stream << arguments;
}
const auto reply = m_busConnection.interface()->startService(helper... | +Priv | 0 | void DBusHelperProxy::executeAction(const QString &action, const QString &helperID, const QVariantMap &arguments, int timeout)
{
QByteArray blob;
{
QDataStream stream(&blob, QIODevice::WriteOnly);
stream << arguments;
}
const auto reply = m_busConnection.interface()->startService(helper... | @@ -235,6 +235,29 @@ bool DBusHelperProxy::hasToStopAction()
return m_stopRequest;
}
+bool DBusHelperProxy::isCallerAuthorized(const QString &action, const QByteArray &callerID)
+{
+ // Check the caller is really who it says it is
+ switch (BackendsManager::authBackend()->extraCallerIDVerificationMethod()... | CWE-290 | null | null |
5,715 | bool DBusHelperProxy::hasToStopAction()
{
QEventLoop loop;
loop.processEvents(QEventLoop::AllEvents);
return m_stopRequest;
}
| +Priv | 0 | bool DBusHelperProxy::hasToStopAction()
{
QEventLoop loop;
loop.processEvents(QEventLoop::AllEvents);
return m_stopRequest;
}
| @@ -235,6 +235,29 @@ bool DBusHelperProxy::hasToStopAction()
return m_stopRequest;
}
+bool DBusHelperProxy::isCallerAuthorized(const QString &action, const QByteArray &callerID)
+{
+ // Check the caller is really who it says it is
+ switch (BackendsManager::authBackend()->extraCallerIDVerificationMethod()... | CWE-290 | null | null |
5,716 | bool DBusHelperProxy::initHelper(const QString &name)
{
new Kf5authAdaptor(this);
if (!m_busConnection.registerService(name)) {
qCWarning(KAUTH) << "Error registering helper DBus service" << name << m_busConnection.lastError().message();
return false;
}
if (!m_busConnection.registerObj... | +Priv | 0 | bool DBusHelperProxy::initHelper(const QString &name)
{
new Kf5authAdaptor(this);
if (!m_busConnection.registerService(name)) {
qCWarning(KAUTH) << "Error registering helper DBus service" << name << m_busConnection.lastError().message();
return false;
}
if (!m_busConnection.registerObj... | @@ -235,6 +235,29 @@ bool DBusHelperProxy::hasToStopAction()
return m_stopRequest;
}
+bool DBusHelperProxy::isCallerAuthorized(const QString &action, const QByteArray &callerID)
+{
+ // Check the caller is really who it says it is
+ switch (BackendsManager::authBackend()->extraCallerIDVerificationMethod()... | CWE-290 | null | null |
5,717 | PolicyKitBackend::PolicyKitBackend()
: AuthBackend()
{
setCapabilities(AuthorizeFromClientCapability);
}
| +Priv | 0 | PolicyKitBackend::PolicyKitBackend()
: AuthBackend()
{
setCapabilities(AuthorizeFromClientCapability);
}
| @@ -78,6 +78,11 @@ QByteArray PolicyKitBackend::callerID() const
return a;
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServicePid;
+}
+
bool PolicyKitBackend::isCallerAuthorized(const QString &action, QByteArray callerI... | CWE-290 | null | null |
5,718 | Action::AuthStatus PolicyKitBackend::actionStatus(const QString &action)
{
PolkitQt::Auth::Result r = PolkitQt::Auth::isCallerAuthorized(action, QCoreApplication::applicationPid(),
false);
switch (r) {
case PolkitQt::Auth::Yes:
return Action::StatusAuthorized;
case... | +Priv | 0 | Action::AuthStatus PolicyKitBackend::actionStatus(const QString &action)
{
PolkitQt::Auth::Result r = PolkitQt::Auth::isCallerAuthorized(action, QCoreApplication::applicationPid(),
false);
switch (r) {
case PolkitQt::Auth::Yes:
return Action::StatusAuthorized;
case... | @@ -78,6 +78,11 @@ QByteArray PolicyKitBackend::callerID() const
return a;
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServicePid;
+}
+
bool PolicyKitBackend::isCallerAuthorized(const QString &action, QByteArray callerI... | CWE-290 | null | null |
5,719 | Action::AuthStatus PolicyKitBackend::authorizeAction(const QString &action)
{
switch (PolkitQt::Auth::computeAndObtainAuth(action)) {
case PolkitQt::Auth::Yes:
return Action::StatusAuthorized;
default:
return Action::StatusDenied;
}
}
| +Priv | 0 | Action::AuthStatus PolicyKitBackend::authorizeAction(const QString &action)
{
switch (PolkitQt::Auth::computeAndObtainAuth(action)) {
case PolkitQt::Auth::Yes:
return Action::StatusAuthorized;
default:
return Action::StatusDenied;
}
}
| @@ -78,6 +78,11 @@ QByteArray PolicyKitBackend::callerID() const
return a;
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServicePid;
+}
+
bool PolicyKitBackend::isCallerAuthorized(const QString &action, QByteArray callerI... | CWE-290 | null | null |
5,720 | QByteArray PolicyKitBackend::callerID() const
{
QByteArray a;
QDataStream s(&a, QIODevice::WriteOnly);
s << QCoreApplication::applicationPid();
return a;
}
| +Priv | 0 | QByteArray PolicyKitBackend::callerID() const
{
QByteArray a;
QDataStream s(&a, QIODevice::WriteOnly);
s << QCoreApplication::applicationPid();
return a;
}
| @@ -78,6 +78,11 @@ QByteArray PolicyKitBackend::callerID() const
return a;
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServicePid;
+}
+
bool PolicyKitBackend::isCallerAuthorized(const QString &action, QByteArray callerI... | CWE-290 | null | null |
5,721 | void PolicyKitBackend::checkForResultChanged()
{
QHash<QString, Action::AuthStatus>::iterator i;
for (i = m_cachedResults.begin(); i != m_cachedResults.end(); ++i) {
if (i.value() != actionStatus(i.key())) {
i.value() = actionStatus(i.key());
emit actionStatusChanged(i.key(), i.v... | +Priv | 0 | void PolicyKitBackend::checkForResultChanged()
{
QHash<QString, Action::AuthStatus>::iterator i;
for (i = m_cachedResults.begin(); i != m_cachedResults.end(); ++i) {
if (i.value() != actionStatus(i.key())) {
i.value() = actionStatus(i.key());
emit actionStatusChanged(i.key(), i.v... | @@ -78,6 +78,11 @@ QByteArray PolicyKitBackend::callerID() const
return a;
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServicePid;
+}
+
bool PolicyKitBackend::isCallerAuthorized(const QString &action, QByteArray callerI... | CWE-290 | null | null |
5,722 | bool PolicyKitBackend::isCallerAuthorized(const QString &action, QByteArray callerID)
{
QDataStream s(&callerID, QIODevice::ReadOnly);
}
| +Priv | 0 | bool PolicyKitBackend::isCallerAuthorized(const QString &action, QByteArray callerID)
{
QDataStream s(&callerID, QIODevice::ReadOnly);
}
| @@ -78,6 +78,11 @@ QByteArray PolicyKitBackend::callerID() const
return a;
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServicePid;
+}
+
bool PolicyKitBackend::isCallerAuthorized(const QString &action, QByteArray callerI... | CWE-290 | null | null |
5,723 | void PolicyKitBackend::setupAction(const QString &action)
{
connect(PolkitQt::Context::instance(), SIGNAL(configChanged()),
this, SLOT(checkForResultChanged()));
connect(PolkitQt::Context::instance(), SIGNAL(consoleKitDBChanged()),
this, SLOT(checkForResultChanged()));
m_cachedResul... | +Priv | 0 | void PolicyKitBackend::setupAction(const QString &action)
{
connect(PolkitQt::Context::instance(), SIGNAL(configChanged()),
this, SLOT(checkForResultChanged()));
connect(PolkitQt::Context::instance(), SIGNAL(consoleKitDBChanged()),
this, SLOT(checkForResultChanged()));
m_cachedResul... | @@ -78,6 +78,11 @@ QByteArray PolicyKitBackend::callerID() const
return a;
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServicePid;
+}
+
bool PolicyKitBackend::isCallerAuthorized(const QString &action, QByteArray callerI... | CWE-290 | null | null |
5,724 | Polkit1Backend::Polkit1Backend()
: AuthBackend()
, m_flyingActions(false)
{
setCapabilities(AuthorizeFromHelperCapability | CheckActionExistenceCapability | PreAuthActionCapability);
connect(PolkitQt1::Authority::instance(), SIGNAL(configChanged()),
this, SLOT(checkForResultChanged()));
... | +Priv | 0 | Polkit1Backend::Polkit1Backend()
: AuthBackend()
, m_flyingActions(false)
{
setCapabilities(AuthorizeFromHelperCapability | CheckActionExistenceCapability | PreAuthActionCapability);
connect(PolkitQt1::Authority::instance(), SIGNAL(configChanged()),
this, SLOT(checkForResultChanged()));
... | @@ -162,6 +162,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCalle... | CWE-290 | null | null |
5,725 | PolkitResultEventLoop::PolkitResultEventLoop(QObject *parent)
: QEventLoop(parent)
{
}
| +Priv | 0 | PolkitResultEventLoop::PolkitResultEventLoop(QObject *parent)
: QEventLoop(parent)
{
}
| @@ -162,6 +162,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCalle... | CWE-290 | null | null |
5,726 | bool Polkit1Backend::actionExists(const QString &action)
{
if (m_flyingActions) {
int tries = 0;
while (m_flyingActions && tries < 10) {
QEventLoop e;
QTimer::singleShot(200, &e, SLOT(quit()));
e.exec();
++tries;
}
}
return m_knownActi... | +Priv | 0 | bool Polkit1Backend::actionExists(const QString &action)
{
if (m_flyingActions) {
int tries = 0;
while (m_flyingActions && tries < 10) {
QEventLoop e;
QTimer::singleShot(200, &e, SLOT(quit()));
e.exec();
++tries;
}
}
return m_knownActi... | @@ -162,6 +162,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCalle... | CWE-290 | null | null |
5,727 | Action::AuthStatus Polkit1Backend::actionStatus(const QString &action)
{
PolkitQt1::SystemBusNameSubject subject(QString::fromUtf8(callerID()));
PolkitQt1::Authority::Result r = PolkitQt1::Authority::instance()->checkAuthorizationSync(action, subject,
PolkitQt1::Authority::N... | +Priv | 0 | Action::AuthStatus Polkit1Backend::actionStatus(const QString &action)
{
PolkitQt1::SystemBusNameSubject subject(QString::fromUtf8(callerID()));
PolkitQt1::Authority::Result r = PolkitQt1::Authority::instance()->checkAuthorizationSync(action, subject,
PolkitQt1::Authority::N... | @@ -162,6 +162,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCalle... | CWE-290 | null | null |
5,728 | Action::AuthStatus Polkit1Backend::authorizeAction(const QString &action)
{
Q_UNUSED(action)
return Action::AuthorizedStatus;
}
| +Priv | 0 | Action::AuthStatus Polkit1Backend::authorizeAction(const QString &action)
{
Q_UNUSED(action)
return Action::AuthorizedStatus;
}
| @@ -162,6 +162,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCalle... | CWE-290 | null | null |
5,729 | QByteArray Polkit1Backend::callerID() const
{
return QDBusConnection::systemBus().baseService().toUtf8();
}
| +Priv | 0 | QByteArray Polkit1Backend::callerID() const
{
return QDBusConnection::systemBus().baseService().toUtf8();
}
| @@ -162,6 +162,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCalle... | CWE-290 | null | null |
5,730 | void Polkit1Backend::checkForResultChanged()
{
Q_FOREACH (const QString &action, m_cachedResults.keys()) {
if (m_cachedResults[action] != actionStatus(action)) {
m_cachedResults[action] = actionStatus(action);
emit actionStatusChanged(action, m_cachedResults[action]);
}
}... | +Priv | 0 | void Polkit1Backend::checkForResultChanged()
{
Q_FOREACH (const QString &action, m_cachedResults.keys()) {
if (m_cachedResults[action] != actionStatus(action)) {
m_cachedResults[action] = actionStatus(action);
emit actionStatusChanged(action, m_cachedResults[action]);
}
}... | @@ -162,6 +162,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCalle... | CWE-290 | null | null |
5,731 | bool Polkit1Backend::isCallerAuthorized(const QString &action, QByteArray callerID)
{
PolkitQt1::SystemBusNameSubject subject(QString::fromUtf8(callerID));
authority->checkAuthorization(action, subject, PolkitQt1::Authority::AllowUserInteraction);
e.exec();
switch (e.result()) {
case PolkitQt1::... | +Priv | 0 | bool Polkit1Backend::isCallerAuthorized(const QString &action, QByteArray callerID)
{
PolkitQt1::SystemBusNameSubject subject(QString::fromUtf8(callerID));
authority->checkAuthorization(action, subject, PolkitQt1::Authority::AllowUserInteraction);
e.exec();
switch (e.result()) {
case PolkitQt1::... | @@ -162,6 +162,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCalle... | CWE-290 | null | null |
5,732 | void Polkit1Backend::preAuthAction(const QString &action, QWidget *parent)
{
if (!parent) {
qCDebug(KAUTH) << "Parent widget does not exist, skipping";
return;
}
if (QDBusConnection::sessionBus().interface()->isServiceRegistered(QLatin1String("org.kde.polkit-kde-authentication-agent-1"))) {... | +Priv | 0 | void Polkit1Backend::preAuthAction(const QString &action, QWidget *parent)
{
if (!parent) {
qCDebug(KAUTH) << "Parent widget does not exist, skipping";
return;
}
if (QDBusConnection::sessionBus().interface()->isServiceRegistered(QLatin1String("org.kde.polkit-kde-authentication-agent-1"))) {... | @@ -162,6 +162,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCalle... | CWE-290 | null | null |
5,733 | void PolkitResultEventLoop::requestQuit(const PolkitQt1::Authority::Result &result)
{
m_result = result;
quit();
}
| +Priv | 0 | void PolkitResultEventLoop::requestQuit(const PolkitQt1::Authority::Result &result)
{
m_result = result;
quit();
}
| @@ -162,6 +162,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCalle... | CWE-290 | null | null |
5,734 | PolkitQt1::Authority::Result PolkitResultEventLoop::result() const
{
return m_result;
}
| +Priv | 0 | PolkitQt1::Authority::Result PolkitResultEventLoop::result() const
{
return m_result;
}
| @@ -162,6 +162,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCalle... | CWE-290 | null | null |
5,735 | void Polkit1Backend::updateCachedActions(const PolkitQt1::ActionDescription::List &actions)
{
m_knownActions.clear();
Q_FOREACH (const PolkitQt1::ActionDescription &action, actions) {
m_knownActions << action.actionId();
}
m_flyingActions = false;
}
| +Priv | 0 | void Polkit1Backend::updateCachedActions(const PolkitQt1::ActionDescription::List &actions)
{
m_knownActions.clear();
Q_FOREACH (const PolkitQt1::ActionDescription &action, actions) {
m_knownActions << action.actionId();
}
m_flyingActions = false;
}
| @@ -162,6 +162,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCalle... | CWE-290 | null | null |
5,736 | AuthBackend::AuthBackend()
: QObject(0)
, d(new Private)
{
}
| +Priv | 0 | AuthBackend::AuthBackend()
: QObject(0)
, d(new Private)
{
}
| @@ -54,6 +54,11 @@ void AuthBackend::setCapabilities(AuthBackend::Capabilities capabilities)
d->capabilities = capabilities;
}
+AuthBackend::ExtraCallerIDVerificationMethod AuthBackend::extraCallerIDVerificationMethod() const
+{
+ return NoExtraCallerIDVerificationMethod;
+}
+
bool AuthBackend::actionExists... | CWE-290 | null | null |
5,737 | bool AuthBackend::actionExists(const QString& action)
{
Q_UNUSED(action);
Q_UNUSED(action)
Q_UNUSED(parent)
}
| +Priv | 0 | bool AuthBackend::actionExists(const QString& action)
{
Q_UNUSED(action);
Q_UNUSED(action)
Q_UNUSED(parent)
}
| @@ -54,6 +54,11 @@ void AuthBackend::setCapabilities(AuthBackend::Capabilities capabilities)
d->capabilities = capabilities;
}
+AuthBackend::ExtraCallerIDVerificationMethod AuthBackend::extraCallerIDVerificationMethod() const
+{
+ return NoExtraCallerIDVerificationMethod;
+}
+
bool AuthBackend::actionExists... | CWE-290 | null | null |
5,738 | Action::AuthStatus DBusHelperProxy::authorizeAction(const QString& action, const QString& helperID)
{
if (!m_actionsInProgress.isEmpty()) {
return Action::Error;
}
QDBusConnection::systemBus().interface()->startService(helperID);
QDBusMessage message;
message = QDBusMessage::createMethodCa... | +Priv | 0 | Action::AuthStatus DBusHelperProxy::authorizeAction(const QString& action, const QString& helperID)
{
if (!m_actionsInProgress.isEmpty()) {
return Action::Error;
}
QDBusConnection::systemBus().interface()->startService(helperID);
QDBusMessage message;
message = QDBusMessage::createMethodCa... | @@ -271,6 +271,29 @@ void DBusHelperProxy::performActions(QByteArray blob, const QByteArray &callerID
}
}
+bool DBusHelperProxy::isCallerAuthorized(const QString &action, const QByteArray &callerID)
+{
+ // Check the caller is really who it says it is
+ switch (BackendsManager::authBackend()->extraCallerI... | CWE-290 | null | null |
5,739 | bool DBusHelperProxy::executeActions(const QList<QPair<QString, QVariantMap> > &list, const QString &helperID)
{
QByteArray blob;
QDataStream stream(&blob, QIODevice::WriteOnly);
stream << list;
QDBusConnection::systemBus().interface()->startService(helperID);
if (!QDBusConnection::systemBus().co... | +Priv | 0 | bool DBusHelperProxy::executeActions(const QList<QPair<QString, QVariantMap> > &list, const QString &helperID)
{
QByteArray blob;
QDataStream stream(&blob, QIODevice::WriteOnly);
stream << list;
QDBusConnection::systemBus().interface()->startService(helperID);
if (!QDBusConnection::systemBus().co... | @@ -271,6 +271,29 @@ void DBusHelperProxy::performActions(QByteArray blob, const QByteArray &callerID
}
}
+bool DBusHelperProxy::isCallerAuthorized(const QString &action, const QByteArray &callerID)
+{
+ // Check the caller is really who it says it is
+ switch (BackendsManager::authBackend()->extraCallerI... | CWE-290 | null | null |
5,740 | Action::AuthStatus PolicyKitBackend::actionStatus(const QString &action)
{
PolkitQt::Auth::Result r = PolkitQt::Auth::isCallerAuthorized(action, QCoreApplication::applicationPid(),
false);
switch (r) {
case PolkitQt::Auth::Yes:
return Action::Authorized;
case Polki... | +Priv | 0 | Action::AuthStatus PolicyKitBackend::actionStatus(const QString &action)
{
PolkitQt::Auth::Result r = PolkitQt::Auth::isCallerAuthorized(action, QCoreApplication::applicationPid(),
false);
switch (r) {
case PolkitQt::Auth::Yes:
return Action::Authorized;
case Polki... | @@ -78,6 +78,11 @@ QByteArray PolicyKitBackend::callerID() const
return a;
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServicePid;
+}
+
bool PolicyKitBackend::isCallerAuthorized(const QString &action, QByteArray callerI... | CWE-290 | null | null |
5,741 | Action::AuthStatus PolicyKitBackend::authorizeAction(const QString &action)
{
switch (PolkitQt::Auth::computeAndObtainAuth(action)) {
case PolkitQt::Auth::Yes:
return Action::Authorized;
default:
return Action::Denied;
}
}
| +Priv | 0 | Action::AuthStatus PolicyKitBackend::authorizeAction(const QString &action)
{
switch (PolkitQt::Auth::computeAndObtainAuth(action)) {
case PolkitQt::Auth::Yes:
return Action::Authorized;
default:
return Action::Denied;
}
}
| @@ -78,6 +78,11 @@ QByteArray PolicyKitBackend::callerID() const
return a;
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServicePid;
+}
+
bool PolicyKitBackend::isCallerAuthorized(const QString &action, QByteArray callerI... | CWE-290 | null | null |
5,742 | PolkitResultEventLoop::PolkitResultEventLoop(QObject* parent)
: QEventLoop(parent)
{
}
| +Priv | 0 | PolkitResultEventLoop::PolkitResultEventLoop(QObject* parent)
: QEventLoop(parent)
{
}
| @@ -163,6 +163,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCallerAut... | CWE-290 | null | null |
5,743 | bool Polkit1Backend::actionExists(const QString& action)
{
if (m_flyingActions) {
int tries = 0;
while (m_flyingActions && tries < 10) {
QEventLoop e;
QTimer::singleShot(200, &e, SLOT(quit()));
e.exec();
++tries;
}
}
return m_knownActi... | +Priv | 0 | bool Polkit1Backend::actionExists(const QString& action)
{
if (m_flyingActions) {
int tries = 0;
while (m_flyingActions && tries < 10) {
QEventLoop e;
QTimer::singleShot(200, &e, SLOT(quit()));
e.exec();
++tries;
}
}
return m_knownActi... | @@ -163,6 +163,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCallerAut... | CWE-290 | null | null |
5,744 | Action::AuthStatus Polkit1Backend::actionStatus(const QString &action)
{
PolkitQt1::SystemBusNameSubject subject(QString::fromUtf8(callerID()));
PolkitQt1::Authority::Result r = PolkitQt1::Authority::instance()->checkAuthorizationSync(action, subject,
... | +Priv | 0 | Action::AuthStatus Polkit1Backend::actionStatus(const QString &action)
{
PolkitQt1::SystemBusNameSubject subject(QString::fromUtf8(callerID()));
PolkitQt1::Authority::Result r = PolkitQt1::Authority::instance()->checkAuthorizationSync(action, subject,
... | @@ -163,6 +163,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCallerAut... | CWE-290 | null | null |
5,745 | Action::AuthStatus Polkit1Backend::authorizeAction(const QString &action)
{
Q_UNUSED(action)
return Action::Authorized;
}
| +Priv | 0 | Action::AuthStatus Polkit1Backend::authorizeAction(const QString &action)
{
Q_UNUSED(action)
return Action::Authorized;
}
| @@ -163,6 +163,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCallerAut... | CWE-290 | null | null |
5,746 | QByteArray Polkit1Backend::callerID() const
{
return QDBusConnection::systemBus().baseService().toUtf8();
}
| +Priv | 0 | QByteArray Polkit1Backend::callerID() const
{
return QDBusConnection::systemBus().baseService().toUtf8();
}
| @@ -163,6 +163,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCallerAut... | CWE-290 | null | null |
5,747 | void Polkit1Backend::checkForResultChanged()
{
foreach(const QString &action, m_cachedResults.keys()) {
if (m_cachedResults[action] != actionStatus(action)) {
m_cachedResults[action] = actionStatus(action);
emit actionStatusChanged(action, m_cachedResults[action]);
}
}
... | +Priv | 0 | void Polkit1Backend::checkForResultChanged()
{
foreach(const QString &action, m_cachedResults.keys()) {
if (m_cachedResults[action] != actionStatus(action)) {
m_cachedResults[action] = actionStatus(action);
emit actionStatusChanged(action, m_cachedResults[action]);
}
}
... | @@ -163,6 +163,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCallerAut... | CWE-290 | null | null |
5,748 | void PolkitResultEventLoop::requestQuit(const PolkitQt1::Authority::Result& result)
{
m_result = result;
quit();
}
| +Priv | 0 | void PolkitResultEventLoop::requestQuit(const PolkitQt1::Authority::Result& result)
{
m_result = result;
quit();
}
| @@ -163,6 +163,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCallerAut... | CWE-290 | null | null |
5,749 | void Polkit1Backend::updateCachedActions(const PolkitQt1::ActionDescription::List& actions)
{
m_knownActions.clear();
foreach (const PolkitQt1::ActionDescription& action, actions) {
m_knownActions << action.actionId();
}
m_flyingActions = false;
}
| +Priv | 0 | void Polkit1Backend::updateCachedActions(const PolkitQt1::ActionDescription::List& actions)
{
m_knownActions.clear();
foreach (const PolkitQt1::ActionDescription& action, actions) {
m_knownActions << action.actionId();
}
m_flyingActions = false;
}
| @@ -163,6 +163,11 @@ QByteArray Polkit1Backend::callerID() const
return QDBusConnection::systemBus().baseService().toUtf8();
}
+AuthBackend::ExtraCallerIDVerificationMethod Polkit1Backend::extraCallerIDVerificationMethod() const
+{
+ return VerifyAgainstDBusServiceName;
+}
+
bool Polkit1Backend::isCallerAut... | CWE-290 | null | null |
5,750 | static int ps_files_cleanup_dir(const char *dirname, int maxlifetime TSRMLS_DC)
{
DIR *dir;
char dentry[sizeof(struct dirent) + MAXPATHLEN];
struct dirent *entry = (struct dirent *) &dentry;
struct stat sbuf;
char buf[MAXPATHLEN];
time_t now;
int nrdels = 0;
size_t dirname_len;
dir = opendir(dirname);
if (!d... | null | 0 | static int ps_files_cleanup_dir(const char *dirname, int maxlifetime TSRMLS_DC)
{
DIR *dir;
char dentry[sizeof(struct dirent) + MAXPATHLEN];
struct dirent *entry = (struct dirent *) &dentry;
struct stat sbuf;
char buf[MAXPATHLEN];
time_t now;
int nrdels = 0;
size_t dirname_len;
dir = opendir(dirname);
if (!d... | @@ -61,40 +61,9 @@ typedef struct {
} ps_files;
ps_module ps_mod_files = {
- PS_MOD(files)
+ PS_MOD_SID(files)
};
-/* If you change the logic here, please also update the error message in
- * ps_files_open() appropriately */
-static int ps_files_valid_key(const char *key)
-{
- size_t len;
- ... | CWE-264 | null | null |
5,751 | static inline php_uint32 ps_sd_hash(const char *data, int len)
{
php_uint32 h;
const char *e = data + len;
for (h = 2166136261U; data < e; ) {
h *= 16777619;
h ^= *data++;
}
return h;
}
| null | 0 | static inline php_uint32 ps_sd_hash(const char *data, int len)
{
php_uint32 h;
const char *e = data + len;
for (h = 2166136261U; data < e; ) {
h *= 16777619;
h ^= *data++;
}
return h;
}
| @@ -124,7 +124,7 @@ static ps_sd *ps_sd_new(ps_mm *data, const char *key)
if (!sd) {
TSRMLS_FETCH();
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "mm_malloc failed, avail %d, err %s", mm_available(data->mm), mm_error());
+ php_error_docref(NULL TSRMLS_CC, E_WARNING... | CWE-264 | null | null |
5,752 | static inline void php_rshutdown_session_globals(TSRMLS_D) /* {{{ */
{
if (PS(http_session_vars)) {
zval_ptr_dtor(&PS(http_session_vars));
PS(http_session_vars) = NULL;
}
/* Do NOT destroy PS(mod_user_names) here! */
if (PS(mod_data) || PS(mod_user_implemented)) {
zend_try {
PS(mod)->s_close(&PS(mod_data) ... | null | 0 | static inline void php_rshutdown_session_globals(TSRMLS_D) /* {{{ */
{
if (PS(http_session_vars)) {
zval_ptr_dtor(&PS(http_session_vars));
PS(http_session_vars) = NULL;
}
/* Do NOT destroy PS(mod_user_names) here! */
if (PS(mod_data) || PS(mod_user_implemented)) {
zend_try {
PS(mod)->s_close(&PS(mod_data) ... | @@ -86,6 +86,8 @@ zend_class_entry *php_session_id_iface_entry;
return FAILURE; \
}
+static void php_session_send_cookie(TSRMLS_D);
+
/* Dispatched by RINIT and by php_session_destroy */
static inline void php_rinit_session_globals(TSRMLS_D) /* {{{ */
{
@@ -126,7 +128,7 @@ static int php_se... | CWE-264 | null | null |
5,753 | PHP_FUNCTION(apache_child_terminate) /* {{{ */
{
if (ZEND_NUM_ARGS() > 0) {
WRONG_PARAM_COUNT;
}
if (fcgi_is_fastcgi()) {
fcgi_terminate();
}
}
/* }}} */
| Exec Code Overflow +Info | 0 | PHP_FUNCTION(apache_child_terminate) /* {{{ */
{
if (ZEND_NUM_ARGS() > 0) {
WRONG_PARAM_COUNT;
}
if (fcgi_is_fastcgi()) {
fcgi_terminate();
}
}
/* }}} */
| @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,754 | PHP_FUNCTION(apache_request_headers) /* {{{ */
{
if (ZEND_NUM_ARGS() > 0) {
WRONG_PARAM_COUNT;
}
array_init(return_value);
if (fcgi_is_fastcgi()) {
fcgi_request *request = (fcgi_request*) SG(server_context);
fcgi_loadenv(request, add_request_header, return_value TSRMLS_CC);
} else {
char buf[128];
char ... | Exec Code Overflow +Info | 0 | PHP_FUNCTION(apache_request_headers) /* {{{ */
{
if (ZEND_NUM_ARGS() > 0) {
WRONG_PARAM_COUNT;
}
array_init(return_value);
if (fcgi_is_fastcgi()) {
fcgi_request *request = (fcgi_request*) SG(server_context);
fcgi_loadenv(request, add_request_header, return_value TSRMLS_CC);
} else {
char buf[128];
char ... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,755 | PHP_FUNCTION(apache_response_headers) /* {{{ */
{
if (ZEND_NUM_ARGS() > 0) {
WRONG_PARAM_COUNT;
}
if (!&SG(sapi_headers).headers) {
RETURN_FALSE;
}
array_init(return_value);
zend_llist_apply_with_argument(&SG(sapi_headers).headers, (llist_apply_with_arg_func_t)add_response_header, return_value TSRMLS_CC);
}
... | Exec Code Overflow +Info | 0 | PHP_FUNCTION(apache_response_headers) /* {{{ */
{
if (ZEND_NUM_ARGS() > 0) {
WRONG_PARAM_COUNT;
}
if (!&SG(sapi_headers).headers) {
RETURN_FALSE;
}
array_init(return_value);
zend_llist_apply_with_argument(&SG(sapi_headers).headers, (llist_apply_with_arg_func_t)add_response_header, return_value TSRMLS_CC);
}
... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,756 | static PHP_MINIT_FUNCTION(cgi)
{
#ifdef ZTS
ts_allocate_id(&php_cgi_globals_id, sizeof(php_cgi_globals_struct), (ts_allocate_ctor) php_cgi_globals_ctor, NULL);
#else
php_cgi_globals_ctor(&php_cgi_globals TSRMLS_CC);
#endif
REGISTER_INI_ENTRIES();
return SUCCESS;
}
| Exec Code Overflow +Info | 0 | static PHP_MINIT_FUNCTION(cgi)
{
#ifdef ZTS
ts_allocate_id(&php_cgi_globals_id, sizeof(php_cgi_globals_struct), (ts_allocate_ctor) php_cgi_globals_ctor, NULL);
#else
php_cgi_globals_ctor(&php_cgi_globals TSRMLS_CC);
#endif
REGISTER_INI_ENTRIES();
return SUCCESS;
}
| @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,757 | static PHP_MSHUTDOWN_FUNCTION(cgi)
{
zend_hash_destroy(&CGIG(user_config_cache));
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
| Exec Code Overflow +Info | 0 | static PHP_MSHUTDOWN_FUNCTION(cgi)
{
zend_hash_destroy(&CGIG(user_config_cache));
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
| @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,758 | static void add_response_header(sapi_header_struct *h, zval *return_value TSRMLS_DC) /* {{{ */
{
char *s, *p;
int len;
ALLOCA_FLAG(use_heap)
if (h->header_len > 0) {
p = strchr(h->header, ':');
len = p - h->header;
if (p && (len > 0)) {
while (len > 0 && (h->header[len-1] == ' ' || h->header[len-1] == '\... | Exec Code Overflow +Info | 0 | static void add_response_header(sapi_header_struct *h, zval *return_value TSRMLS_DC) /* {{{ */
{
char *s, *p;
int len;
ALLOCA_FLAG(use_heap)
if (h->header_len > 0) {
p = strchr(h->header, ':');
len = p - h->header;
if (p && (len > 0)) {
while (len > 0 && (h->header[len-1] == ' ' || h->header[len-1] == '\... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,759 | static void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC)
{
if (PG(http_globals)[TRACK_VARS_ENV] &&
array_ptr != PG(http_globals)[TRACK_VARS_ENV] &&
Z_TYPE_P(PG(http_globals)[TRACK_VARS_ENV]) == IS_ARRAY &&
zend_hash_num_elements(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_ENV])) > 0
) {
zval_dto... | Exec Code Overflow +Info | 0 | static void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC)
{
if (PG(http_globals)[TRACK_VARS_ENV] &&
array_ptr != PG(http_globals)[TRACK_VARS_ENV] &&
Z_TYPE_P(PG(http_globals)[TRACK_VARS_ENV]) == IS_ARRAY &&
zend_hash_num_elements(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_ENV])) > 0
) {
zval_dto... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,760 | static int extension_name_cmp(const zend_llist_element **f, const zend_llist_element **s TSRMLS_DC)
{
return strcmp( ((zend_extension *)(*f)->data)->name,
((zend_extension *)(*s)->data)->name);
}
| Exec Code Overflow +Info | 0 | static int extension_name_cmp(const zend_llist_element **f, const zend_llist_element **s TSRMLS_DC)
{
return strcmp( ((zend_extension *)(*f)->data)->name,
((zend_extension *)(*s)->data)->name);
}
| @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,761 | void fastcgi_cleanup(int signal)
{
#ifdef DEBUG_FASTCGI
fprintf(stderr, "FastCGI shutdown, pid %d\n", getpid());
#endif
sigaction(SIGTERM, &old_term, 0);
/* Kill all the processes in our process group */
kill(-pgroup, SIGTERM);
if (parent && parent_waiting) {
exit_signal = 1;
} else {
exit(0);
}
}
| Exec Code Overflow +Info | 0 | void fastcgi_cleanup(int signal)
{
#ifdef DEBUG_FASTCGI
fprintf(stderr, "FastCGI shutdown, pid %d\n", getpid());
#endif
sigaction(SIGTERM, &old_term, 0);
/* Kill all the processes in our process group */
kill(-pgroup, SIGTERM);
if (parent && parent_waiting) {
exit_signal = 1;
} else {
exit(0);
}
}
| @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,762 | static void init_request_info(fcgi_request *request TSRMLS_DC)
{
char *env_script_filename = CGI_GETENV("SCRIPT_FILENAME");
char *env_path_translated = CGI_GETENV("PATH_TRANSLATED");
char *script_path_translated = env_script_filename;
/* some broken servers do not have script_filename or argv0
* an example, IIS ... | Exec Code Overflow +Info | 0 | static void init_request_info(fcgi_request *request TSRMLS_DC)
{
char *env_script_filename = CGI_GETENV("SCRIPT_FILENAME");
char *env_path_translated = CGI_GETENV("PATH_TRANSLATED");
char *script_path_translated = env_script_filename;
/* some broken servers do not have script_filename or argv0
* an example, IIS ... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,763 | static int is_valid_path(const char *path)
{
const char *p = path;
if (UNEXPECTED(!p)) {
return 0;
}
if (UNEXPECTED(*p == '.') && *(p+1) == '.' && (!*(p+2) || IS_SLASH(*(p+2)))) {
return 0;
}
while (*p) {
if (IS_SLASH(*p)) {
p++;
if (UNEXPECTED(*p == '.')) {
p++;
if (UNEXPECTED(*p == '.')) {
... | Exec Code Overflow +Info | 0 | static int is_valid_path(const char *path)
{
const char *p = path;
if (UNEXPECTED(!p)) {
return 0;
}
if (UNEXPECTED(*p == '.') && *(p+1) == '.' && (!*(p+2) || IS_SLASH(*(p+2)))) {
return 0;
}
while (*p) {
if (IS_SLASH(*p)) {
p++;
if (UNEXPECTED(*p == '.')) {
p++;
if (UNEXPECTED(*p == '.')) {
... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,764 | static void php_cgi_globals_ctor(php_cgi_globals_struct *php_cgi_globals TSRMLS_DC)
{
php_cgi_globals->rfc2616_headers = 0;
php_cgi_globals->nph = 0;
php_cgi_globals->check_shebang_line = 1;
php_cgi_globals->force_redirect = 1;
php_cgi_globals->redirect_status_env = NULL;
php_cgi_globals->fix_pathinfo = 1;
php_c... | Exec Code Overflow +Info | 0 | static void php_cgi_globals_ctor(php_cgi_globals_struct *php_cgi_globals TSRMLS_DC)
{
php_cgi_globals->rfc2616_headers = 0;
php_cgi_globals->nph = 0;
php_cgi_globals->check_shebang_line = 1;
php_cgi_globals->force_redirect = 1;
php_cgi_globals->redirect_status_env = NULL;
php_cgi_globals->fix_pathinfo = 1;
php_c... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,765 | static int php_cgi_startup(sapi_module_struct *sapi_module)
{
if (php_module_startup(sapi_module, &cgi_module_entry, 1) == FAILURE) {
return FAILURE;
}
return SUCCESS;
}
| Exec Code Overflow +Info | 0 | static int php_cgi_startup(sapi_module_struct *sapi_module)
{
if (php_module_startup(sapi_module, &cgi_module_entry, 1) == FAILURE) {
return FAILURE;
}
return SUCCESS;
}
| @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,766 | static void php_cgi_usage(char *argv0)
{
char *prog;
prog = strrchr(argv0, '/');
if (prog) {
prog++;
} else {
prog = "php";
}
php_printf( "Usage: %s [-q] [-h] [-s] [-v] [-i] [-f <file>]\n"
" %s <file> [args...]\n"
" -a Run interactively\n"
" -b <address:port>|<port> Bind Pa... | Exec Code Overflow +Info | 0 | static void php_cgi_usage(char *argv0)
{
char *prog;
prog = strrchr(argv0, '/');
if (prog) {
prog++;
} else {
prog = "php";
}
php_printf( "Usage: %s [-q] [-h] [-s] [-v] [-i] [-f <file>]\n"
" %s <file> [args...]\n"
" -a Run interactively\n"
" -b <address:port>|<port> Bind Pa... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,767 | static void print_extensions(TSRMLS_D)
{
zend_llist sorted_exts;
zend_llist_copy(&sorted_exts, &zend_extensions);
sorted_exts.dtor = NULL;
zend_llist_sort(&sorted_exts, extension_name_cmp TSRMLS_CC);
zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) print_extension_info, NULL TSRMLS_CC);
... | Exec Code Overflow +Info | 0 | static void print_extensions(TSRMLS_D)
{
zend_llist sorted_exts;
zend_llist_copy(&sorted_exts, &zend_extensions);
sorted_exts.dtor = NULL;
zend_llist_sort(&sorted_exts, extension_name_cmp TSRMLS_CC);
zend_llist_apply_with_argument(&sorted_exts, (llist_apply_with_arg_func_t) print_extension_info, NULL TSRMLS_CC);
... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,768 | static int print_module_info(zend_module_entry *module, void *arg TSRMLS_DC)
{
php_printf("%s\n", module->name);
return 0;
}
| Exec Code Overflow +Info | 0 | static int print_module_info(zend_module_entry *module, void *arg TSRMLS_DC)
{
php_printf("%s\n", module->name);
return 0;
}
| @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,769 | static void print_modules(TSRMLS_D)
{
HashTable sorted_registry;
zend_module_entry tmp;
zend_hash_init(&sorted_registry, 50, NULL, NULL, 1);
zend_hash_copy(&sorted_registry, &module_registry, NULL, &tmp, sizeof(zend_module_entry));
zend_hash_sort(&sorted_registry, zend_qsort, module_name_cmp, 0 TSRMLS_CC);
zend_... | Exec Code Overflow +Info | 0 | static void print_modules(TSRMLS_D)
{
HashTable sorted_registry;
zend_module_entry tmp;
zend_hash_init(&sorted_registry, 50, NULL, NULL, 1);
zend_hash_copy(&sorted_registry, &module_registry, NULL, &tmp, sizeof(zend_module_entry));
zend_hash_sort(&sorted_registry, zend_qsort, module_name_cmp, 0 TSRMLS_CC);
zend_... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,770 | static int sapi_cgi_activate(TSRMLS_D)
{
char *path, *doc_root, *server_name;
uint path_len, doc_root_len, server_name_len;
/* PATH_TRANSLATED should be defined at this stage but better safe than sorry :) */
if (!SG(request_info).path_translated) {
return FAILURE;
}
if (php_ini_has_per_host_config()) {
/* A... | Exec Code Overflow +Info | 0 | static int sapi_cgi_activate(TSRMLS_D)
{
char *path, *doc_root, *server_name;
uint path_len, doc_root_len, server_name_len;
/* PATH_TRANSLATED should be defined at this stage but better safe than sorry :) */
if (!SG(request_info).path_translated) {
return FAILURE;
}
if (php_ini_has_per_host_config()) {
/* A... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,771 | static void sapi_cgi_flush(void *server_context)
{
if (fflush(stdout) == EOF) {
php_handle_aborted_connection();
}
}
| Exec Code Overflow +Info | 0 | static void sapi_cgi_flush(void *server_context)
{
if (fflush(stdout) == EOF) {
php_handle_aborted_connection();
}
}
| @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,772 | static char *sapi_cgi_getenv(char *name, size_t name_len TSRMLS_DC)
{
return getenv(name);
}
| Exec Code Overflow +Info | 0 | static char *sapi_cgi_getenv(char *name, size_t name_len TSRMLS_DC)
{
return getenv(name);
}
| @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,773 | static char *sapi_cgi_read_cookies(TSRMLS_D)
{
return getenv("HTTP_COOKIE");
}
| Exec Code Overflow +Info | 0 | static char *sapi_cgi_read_cookies(TSRMLS_D)
{
return getenv("HTTP_COOKIE");
}
| @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,774 | static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
{
char buf[SAPI_CGI_MAX_HEADER_LENGTH];
sapi_header_struct *h;
zend_llist_position pos;
zend_bool ignore_status = 0;
int response_status = SG(sapi_headers).http_response_code;
if (SG(request_info).no_headers == 1) {
return SAPI_HEAD... | Exec Code Overflow +Info | 0 | static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
{
char buf[SAPI_CGI_MAX_HEADER_LENGTH];
sapi_header_struct *h;
zend_llist_position pos;
zend_bool ignore_status = 0;
int response_status = SG(sapi_headers).http_response_code;
if (SG(request_info).no_headers == 1) {
return SAPI_HEAD... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,775 | static int sapi_cgi_ub_write(const char *str, uint str_length TSRMLS_DC)
{
const char *ptr = str;
uint remaining = str_length;
size_t ret;
while (remaining > 0) {
ret = sapi_cgi_single_write(ptr, remaining TSRMLS_CC);
if (!ret) {
php_handle_aborted_connection();
return str_length - remaining;
}
ptr +... | Exec Code Overflow +Info | 0 | static int sapi_cgi_ub_write(const char *str, uint str_length TSRMLS_DC)
{
const char *ptr = str;
uint remaining = str_length;
size_t ret;
while (remaining > 0) {
ret = sapi_cgi_single_write(ptr, remaining TSRMLS_CC);
if (!ret) {
php_handle_aborted_connection();
return str_length - remaining;
}
ptr +... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,776 | static void sapi_fcgi_flush(void *server_context)
{
fcgi_request *request = (fcgi_request*) server_context;
if (
#ifndef PHP_WIN32
!parent &&
#endif
request && !fcgi_flush(request, 0)) {
php_handle_aborted_connection();
}
}
| Exec Code Overflow +Info | 0 | static void sapi_fcgi_flush(void *server_context)
{
fcgi_request *request = (fcgi_request*) server_context;
if (
#ifndef PHP_WIN32
!parent &&
#endif
request && !fcgi_flush(request, 0)) {
php_handle_aborted_connection();
}
}
| @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,777 | static char *sapi_fcgi_getenv(char *name, size_t name_len TSRMLS_DC)
{
/* when php is started by mod_fastcgi, no regular environment
* is provided to PHP. It is always sent to PHP at the start
* of a request. So we have to do our own lookup to get env
* vars. This could probably be faster somehow. */
fcgi_r... | Exec Code Overflow +Info | 0 | static char *sapi_fcgi_getenv(char *name, size_t name_len TSRMLS_DC)
{
/* when php is started by mod_fastcgi, no regular environment
* is provided to PHP. It is always sent to PHP at the start
* of a request. So we have to do our own lookup to get env
* vars. This could probably be faster somehow. */
fcgi_r... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,778 | static int sapi_fcgi_ub_write(const char *str, uint str_length TSRMLS_DC)
{
const char *ptr = str;
uint remaining = str_length;
fcgi_request *request = (fcgi_request*) SG(server_context);
while (remaining > 0) {
long ret = fcgi_write(request, FCGI_STDOUT, ptr, remaining);
if (ret <= 0) {
php_handle_aborted... | Exec Code Overflow +Info | 0 | static int sapi_fcgi_ub_write(const char *str, uint str_length TSRMLS_DC)
{
const char *ptr = str;
uint remaining = str_length;
fcgi_request *request = (fcgi_request*) SG(server_context);
while (remaining > 0) {
long ret = fcgi_write(request, FCGI_STDOUT, ptr, remaining);
if (ret <= 0) {
php_handle_aborted... | @@ -2429,14 +2429,17 @@ consult the installation file that came with this distribution, or visit \n\
int i = 1;
c = file_handle.handle.stream.mmap.buf[i++];
- w... | CWE-119 | null | null |
5,779 | hook_add_to_infolist (struct t_infolist *infolist, const char *arguments)
{
const char *pos_arguments;
char *type;
int i, type_int;
if (!infolist)
return 0;
type = NULL;
pos_arguments = NULL;
if (arguments && arguments[0])
{
pos_arguments = strchr (arguments, ',');
... | Exec Code | 0 | hook_add_to_infolist (struct t_infolist *infolist, const char *arguments)
{
const char *pos_arguments;
char *type;
int i, type_int;
if (!infolist)
return 0;
type = NULL;
pos_arguments = NULL;
if (arguments && arguments[0])
{
pos_arguments = strchr (arguments, ',');
... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,780 | hook_add_to_infolist_type (struct t_infolist *infolist, int type,
const char *arguments)
{
struct t_hook *ptr_hook;
struct t_infolist_item *ptr_item;
char value[64];
int match;
for (ptr_hook = weechat_hooks[type]; ptr_hook;
ptr_hook = ptr_hook->next_hook)
{
... | Exec Code | 0 | hook_add_to_infolist_type (struct t_infolist *infolist, int type,
const char *arguments)
{
struct t_hook *ptr_hook;
struct t_infolist_item *ptr_item;
char value[64];
int match;
for (ptr_hook = weechat_hooks[type]; ptr_hook;
ptr_hook = ptr_hook->next_hook)
{
... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,781 | hook_command (struct t_weechat_plugin *plugin, const char *command,
const char *description,
const char *args, const char *args_description,
const char *completion,
t_hook_callback_command *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t... | Exec Code | 0 | hook_command (struct t_weechat_plugin *plugin, const char *command,
const char *description,
const char *args, const char *args_description,
const char *completion,
t_hook_callback_command *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,782 | hook_command_build_completion (struct t_hook_command *hook_command)
{
int i, j, k, length, num_items;
struct t_weelist *list;
char *pos_completion, *pos_double_pipe, *pos_start, *pos_end;
char **items, *last_space, *ptr_template;
/* split templates using "||" as separator */
hook_command->cplt_... | Exec Code | 0 | hook_command_build_completion (struct t_hook_command *hook_command)
{
int i, j, k, length, num_items;
struct t_weelist *list;
char *pos_completion, *pos_double_pipe, *pos_start, *pos_end;
char **items, *last_space, *ptr_template;
/* split templates using "||" as separator */
hook_command->cplt_... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,783 | hook_command_run (struct t_weechat_plugin *plugin, const char *command,
t_hook_callback_command_run *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_command_run *new_hook_command_run;
int priority;
const char *ptr_command;
if (!callback)
return NULL... | Exec Code | 0 | hook_command_run (struct t_weechat_plugin *plugin, const char *command,
t_hook_callback_command_run *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_command_run *new_hook_command_run;
int priority;
const char *ptr_command;
if (!callback)
return NULL... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,784 | hook_completion (struct t_weechat_plugin *plugin, const char *completion_item,
const char *description,
t_hook_callback_completion *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_completion *new_hook_completion;
int priority;
const char *ptr_com... | Exec Code | 0 | hook_completion (struct t_weechat_plugin *plugin, const char *completion_item,
const char *description,
t_hook_callback_completion *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_completion *new_hook_completion;
int priority;
const char *ptr_com... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,785 | hook_completion_exec (struct t_weechat_plugin *plugin,
const char *completion_item,
struct t_gui_buffer *buffer,
struct t_gui_completion *completion)
{
struct t_hook *ptr_hook, *next_hook;
/* make C compiler happy */
(void) plugin;
hook... | Exec Code | 0 | hook_completion_exec (struct t_weechat_plugin *plugin,
const char *completion_item,
struct t_gui_buffer *buffer,
struct t_gui_completion *completion)
{
struct t_hook *ptr_hook, *next_hook;
/* make C compiler happy */
(void) plugin;
hook... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,786 | hook_config (struct t_weechat_plugin *plugin, const char *option,
t_hook_callback_config *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_config *new_hook_config;
int priority;
const char *ptr_option;
if (!callback)
return NULL;
new_hook = malloc (s... | Exec Code | 0 | hook_config (struct t_weechat_plugin *plugin, const char *option,
t_hook_callback_config *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_config *new_hook_config;
int priority;
const char *ptr_option;
if (!callback)
return NULL;
new_hook = malloc (s... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,787 | hook_config_exec (const char *option, const char *value)
{
struct t_hook *ptr_hook, *next_hook;
hook_exec_start ();
ptr_hook = weechat_hooks[HOOK_TYPE_CONFIG];
while (ptr_hook)
{
next_hook = ptr_hook->next_hook;
if (!ptr_hook->deleted
&& !ptr_hook->running
... | Exec Code | 0 | hook_config_exec (const char *option, const char *value)
{
struct t_hook *ptr_hook, *next_hook;
hook_exec_start ();
ptr_hook = weechat_hooks[HOOK_TYPE_CONFIG];
while (ptr_hook)
{
next_hook = ptr_hook->next_hook;
if (!ptr_hook->deleted
&& !ptr_hook->running
... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,788 | hook_connect_gnutls_verify_certificates (gnutls_session_t tls_session)
{
struct t_hook *ptr_hook;
int rc;
rc = -1;
ptr_hook = weechat_hooks[HOOK_TYPE_CONNECT];
while (ptr_hook)
{
/* looking for the right hook using to the gnutls session pointer */
if (!ptr_hook->deleted
... | Exec Code | 0 | hook_connect_gnutls_verify_certificates (gnutls_session_t tls_session)
{
struct t_hook *ptr_hook;
int rc;
rc = -1;
ptr_hook = weechat_hooks[HOOK_TYPE_CONNECT];
while (ptr_hook)
{
/* looking for the right hook using to the gnutls session pointer */
if (!ptr_hook->deleted
... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,789 | hook_exec_end ()
{
if (hook_exec_recursion > 0)
hook_exec_recursion--;
if (hook_exec_recursion == 0)
hook_remove_deleted ();
}
| Exec Code | 0 | hook_exec_end ()
{
if (hook_exec_recursion > 0)
hook_exec_recursion--;
if (hook_exec_recursion == 0)
hook_remove_deleted ();
}
| @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,790 | hook_fd (struct t_weechat_plugin *plugin, int fd, int flag_read,
int flag_write, int flag_exception,
t_hook_callback_fd *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_fd *new_hook_fd;
if ((fd < 0) || hook_search_fd (fd) || !callback)
return NULL;
new... | Exec Code | 0 | hook_fd (struct t_weechat_plugin *plugin, int fd, int flag_read,
int flag_write, int flag_exception,
t_hook_callback_fd *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_fd *new_hook_fd;
if ((fd < 0) || hook_search_fd (fd) || !callback)
return NULL;
new... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,791 | hook_fd_exec (fd_set *read_fds, fd_set *write_fds, fd_set *exception_fds)
{
struct t_hook *ptr_hook, *next_hook;
hook_exec_start ();
ptr_hook = weechat_hooks[HOOK_TYPE_FD];
while (ptr_hook)
{
next_hook = ptr_hook->next_hook;
if (!ptr_hook->deleted
&& !ptr_hook->running... | Exec Code | 0 | hook_fd_exec (fd_set *read_fds, fd_set *write_fds, fd_set *exception_fds)
{
struct t_hook *ptr_hook, *next_hook;
hook_exec_start ();
ptr_hook = weechat_hooks[HOOK_TYPE_FD];
while (ptr_hook)
{
next_hook = ptr_hook->next_hook;
if (!ptr_hook->deleted
&& !ptr_hook->running... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,792 | hook_fd_set (fd_set *read_fds, fd_set *write_fds, fd_set *exception_fds)
{
struct t_hook *ptr_hook;
int max_fd;
max_fd = 0;
for (ptr_hook = weechat_hooks[HOOK_TYPE_FD]; ptr_hook;
ptr_hook = ptr_hook->next_hook)
{
if (!ptr_hook->deleted)
{
/* skip invalid file de... | Exec Code | 0 | hook_fd_set (fd_set *read_fds, fd_set *write_fds, fd_set *exception_fds)
{
struct t_hook *ptr_hook;
int max_fd;
max_fd = 0;
for (ptr_hook = weechat_hooks[HOOK_TYPE_FD]; ptr_hook;
ptr_hook = ptr_hook->next_hook)
{
if (!ptr_hook->deleted)
{
/* skip invalid file de... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,793 | hook_find_pos (struct t_hook *hook)
{
struct t_hook *ptr_hook;
int rc_cmp;
if (hook->type == HOOK_TYPE_COMMAND)
{
/* for command hook, sort on command name */
for (ptr_hook = weechat_hooks[hook->type]; ptr_hook;
ptr_hook = ptr_hook->next_hook)
{
if (!ptr... | Exec Code | 0 | hook_find_pos (struct t_hook *hook)
{
struct t_hook *ptr_hook;
int rc_cmp;
if (hook->type == HOOK_TYPE_COMMAND)
{
/* for command hook, sort on command name */
for (ptr_hook = weechat_hooks[hook->type]; ptr_hook;
ptr_hook = ptr_hook->next_hook)
{
if (!ptr... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,794 | hook_focus (struct t_weechat_plugin *plugin, const char *area,
t_hook_callback_focus *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_focus *new_hook_focus;
int priority;
const char *ptr_area;
if (!area || !area[0] || !callback)
return NULL;
new_hook... | Exec Code | 0 | hook_focus (struct t_weechat_plugin *plugin, const char *area,
t_hook_callback_focus *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_focus *new_hook_focus;
int priority;
const char *ptr_area;
if (!area || !area[0] || !callback)
return NULL;
new_hook... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,795 | hook_focus_get_data (struct t_hashtable *hashtable_focus1,
struct t_hashtable *hashtable_focus2)
{
struct t_hook *ptr_hook, *next_hook;
struct t_hashtable *hashtable1, *hashtable2, *hashtable_ret;
const char *focus1_chat, *focus1_bar_item_name, *keys;
char **list_keys, *new_key;
... | Exec Code | 0 | hook_focus_get_data (struct t_hashtable *hashtable_focus1,
struct t_hashtable *hashtable_focus2)
{
struct t_hook *ptr_hook, *next_hook;
struct t_hashtable *hashtable1, *hashtable2, *hashtable_ret;
const char *focus1_chat, *focus1_bar_item_name, *keys;
char **list_keys, *new_key;
... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,796 | hook_focus_hashtable_map2_cb (void *data, struct t_hashtable *hashtable,
const void *key, const void *value)
{
struct t_hashtable *hashtable1;
int length;
char *key2;
/* make C compiler happy */
(void) hashtable;
hashtable1 = (struct t_hashtable *)data;
lengt... | Exec Code | 0 | hook_focus_hashtable_map2_cb (void *data, struct t_hashtable *hashtable,
const void *key, const void *value)
{
struct t_hashtable *hashtable1;
int length;
char *key2;
/* make C compiler happy */
(void) hashtable;
hashtable1 = (struct t_hashtable *)data;
lengt... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,797 | hook_focus_hashtable_map_cb (void *data, struct t_hashtable *hashtable,
const void *key, const void *value)
{
struct t_hashtable *hashtable1;
/* make C compiler happy */
(void) hashtable;
hashtable1 = (struct t_hashtable *)data;
if (hashtable1 && key && value)
... | Exec Code | 0 | hook_focus_hashtable_map_cb (void *data, struct t_hashtable *hashtable,
const void *key, const void *value)
{
struct t_hashtable *hashtable1;
/* make C compiler happy */
(void) hashtable;
hashtable1 = (struct t_hashtable *)data;
if (hashtable1 && key && value)
... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,798 | hook_hdata (struct t_weechat_plugin *plugin, const char *hdata_name,
const char *description,
t_hook_callback_hdata *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_hdata *new_hook_hdata;
int priority;
const char *ptr_hdata_name;
if (!hdata_name || !h... | Exec Code | 0 | hook_hdata (struct t_weechat_plugin *plugin, const char *hdata_name,
const char *description,
t_hook_callback_hdata *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_hdata *new_hook_hdata;
int priority;
const char *ptr_hdata_name;
if (!hdata_name || !h... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
5,799 | hook_hdata_get (struct t_weechat_plugin *plugin, const char *hdata_name)
{
struct t_hook *ptr_hook, *next_hook;
struct t_hdata *value;
/* make C compiler happy */
(void) plugin;
if (!hdata_name || !hdata_name[0])
return NULL;
if (weechat_hdata)
{
value = hashtable_get (wee... | Exec Code | 0 | hook_hdata_get (struct t_weechat_plugin *plugin, const char *hdata_name)
{
struct t_hook *ptr_hook, *next_hook;
struct t_hdata *value;
/* make C compiler happy */
(void) plugin;
if (!hdata_name || !hdata_name[0])
return NULL;
if (weechat_hdata)
{
value = hashtable_get (wee... | @@ -1388,9 +1388,9 @@ hook_process (struct t_weechat_plugin *plugin,
void
hook_process_child (struct t_hook *hook_process)
{
- char *exec_args[4] = { "sh", "-c", NULL, NULL };
+ char **exec_args;
const char *ptr_url;
- int rc;
+ int rc, i;
/*
* close stdin, so that process will fail to ... | CWE-20 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.