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,900 | ZEND_API int zend_ts_hash_rehash(TsHashTable *ht)
{
int retval;
begin_write(ht);
retval = zend_hash_rehash(TS_HASH(ht));
end_write(ht);
return retval;
}
| DoS | 0 | ZEND_API int zend_ts_hash_rehash(TsHashTable *ht)
{
int retval;
begin_write(ht);
retval = zend_hash_rehash(TS_HASH(ht));
end_write(ht);
return retval;
}
| @@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,901 | ZEND_API void zend_ts_hash_reverse_apply(TsHashTable *ht, apply_func_t apply_func)
{
begin_write(ht);
zend_hash_reverse_apply(TS_HASH(ht), apply_func);
end_write(ht);
}
| DoS | 0 | ZEND_API void zend_ts_hash_reverse_apply(TsHashTable *ht, apply_func_t apply_func)
{
begin_write(ht);
zend_hash_reverse_apply(TS_HASH(ht), apply_func);
end_write(ht);
}
| @@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,902 | ZEND_API zval *zend_ts_hash_str_find(TsHashTable *ht, const char *key, size_t len)
{
zval *retval;
begin_read(ht);
retval = zend_hash_str_find(TS_HASH(ht), key, len);
end_read(ht);
return retval;
}
| DoS | 0 | ZEND_API zval *zend_ts_hash_str_find(TsHashTable *ht, const char *key, size_t len)
{
zval *retval;
begin_read(ht);
retval = zend_hash_str_find(TS_HASH(ht), key, len);
end_read(ht);
return retval;
}
| @@ -140,7 +140,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,903 | ZEND_API int _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC)
{
#ifdef ZTS
ht->mx_reader = tsrm_mutex_alloc();
ht->mx_writer = tsrm_mutex_alloc();
ht->reader = 0;
#endif
return _zend_hash_init_e... | DoS | 0 | ZEND_API int _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC)
{
#ifdef ZTS
ht->mx_reader = tsrm_mutex_alloc();
ht->mx_writer = tsrm_mutex_alloc();
ht->reader = 0;
#endif
return _zend_hash_init_e... | @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,904 | ZEND_API int _zend_ts_hash_quick_add_or_update(TsHashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
{
int retval;
begin_write(ht);
retval = _zend_hash_quick_add_or_update(TS_HASH(ht), arKey, nKeyLength, h, pData, nDataSize, pDest, flag ZEND_F... | DoS | 0 | ZEND_API int _zend_ts_hash_quick_add_or_update(TsHashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
{
int retval;
begin_write(ht);
retval = _zend_hash_quick_add_or_update(TS_HASH(ht), arKey, nKeyLength, h, pData, nDataSize, pDest, flag ZEND_F... | @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,905 | ZEND_API ulong zend_ts_get_hash_value(TsHashTable *ht, char *arKey, uint nKeyLength)
{
ulong retval;
begin_read(ht);
retval = zend_get_hash_value(arKey, nKeyLength);
end_read(ht);
return retval;
}
| DoS | 0 | ZEND_API ulong zend_ts_get_hash_value(TsHashTable *ht, char *arKey, uint nKeyLength)
{
ulong retval;
begin_read(ht);
retval = zend_get_hash_value(arKey, nKeyLength);
end_read(ht);
return retval;
}
| @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,906 | ZEND_API int zend_ts_hash_add_empty_element(TsHashTable *ht, char *arKey, uint nKeyLength)
{
int retval;
begin_write(ht);
retval = zend_hash_add_empty_element(TS_HASH(ht), arKey, nKeyLength);
end_write(ht);
return retval;
}
| DoS | 0 | ZEND_API int zend_ts_hash_add_empty_element(TsHashTable *ht, char *arKey, uint nKeyLength)
{
int retval;
begin_write(ht);
retval = zend_hash_add_empty_element(TS_HASH(ht), arKey, nKeyLength);
end_write(ht);
return retval;
}
| @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,907 | ZEND_API void zend_ts_hash_apply_with_argument(TsHashTable *ht, apply_func_arg_t apply_func, void *argument TSRMLS_DC)
{
begin_write(ht);
zend_hash_apply_with_argument(TS_HASH(ht), apply_func, argument TSRMLS_CC);
end_write(ht);
}
| DoS | 0 | ZEND_API void zend_ts_hash_apply_with_argument(TsHashTable *ht, apply_func_arg_t apply_func, void *argument TSRMLS_DC)
{
begin_write(ht);
zend_hash_apply_with_argument(TS_HASH(ht), apply_func, argument TSRMLS_CC);
end_write(ht);
}
| @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,908 | ZEND_API void zend_ts_hash_apply_with_arguments(TsHashTable *ht TSRMLS_DC, apply_func_args_t apply_func, int num_args, ...)
{
va_list args;
va_start(args, num_args);
begin_write(ht);
zend_hash_apply_with_arguments(TS_HASH(ht) TSRMLS_CC, apply_func, num_args, args);
end_write(ht);
va_end(args);
}
| DoS | 0 | ZEND_API void zend_ts_hash_apply_with_arguments(TsHashTable *ht TSRMLS_DC, apply_func_args_t apply_func, int num_args, ...)
{
va_list args;
va_start(args, num_args);
begin_write(ht);
zend_hash_apply_with_arguments(TS_HASH(ht) TSRMLS_CC, apply_func, num_args, args);
end_write(ht);
va_end(args);
}
| @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,909 | ZEND_API int zend_ts_hash_compare(TsHashTable *ht1, TsHashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC)
{
int retval;
begin_read(ht1);
begin_read(ht2);
retval = zend_hash_compare(TS_HASH(ht1), TS_HASH(ht2), compar, ordered TSRMLS_CC);
end_read(ht2);
end_read(ht1);
return retval;
}
| DoS | 0 | ZEND_API int zend_ts_hash_compare(TsHashTable *ht1, TsHashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC)
{
int retval;
begin_read(ht1);
begin_read(ht2);
retval = zend_hash_compare(TS_HASH(ht1), TS_HASH(ht2), compar, ordered TSRMLS_CC);
end_read(ht2);
end_read(ht1);
return retval;
}
| @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,910 | ZEND_API void zend_ts_hash_copy(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size)
{
begin_read(source);
begin_write(target);
zend_hash_copy(TS_HASH(target), TS_HASH(source), pCopyConstructor, tmp, size);
end_write(target);
end_read(source);
}
| DoS | 0 | ZEND_API void zend_ts_hash_copy(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size)
{
begin_read(source);
begin_write(target);
zend_hash_copy(TS_HASH(target), TS_HASH(source), pCopyConstructor, tmp, size);
end_write(target);
end_read(source);
}
| @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,911 | ZEND_API void zend_ts_hash_copy_to_hash(HashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size)
{
begin_read(source);
zend_hash_copy(target, TS_HASH(source), pCopyConstructor, tmp, size);
end_read(source);
}
| DoS | 0 | ZEND_API void zend_ts_hash_copy_to_hash(HashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size)
{
begin_read(source);
zend_hash_copy(target, TS_HASH(source), pCopyConstructor, tmp, size);
end_read(source);
}
| @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,912 | void zend_ts_hash_display_pListTail(TsHashTable *ht)
{
begin_read(ht);
zend_hash_display_pListTail(TS_HASH(ht));
end_read(ht);
}
| DoS | 0 | void zend_ts_hash_display_pListTail(TsHashTable *ht)
{
begin_read(ht);
zend_hash_display_pListTail(TS_HASH(ht));
end_read(ht);
}
| @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,913 | ZEND_API int zend_ts_hash_exists(TsHashTable *ht, char *arKey, uint nKeyLength)
{
int retval;
begin_read(ht);
retval = zend_hash_exists(TS_HASH(ht), arKey, nKeyLength);
end_read(ht);
return retval;
}
| DoS | 0 | ZEND_API int zend_ts_hash_exists(TsHashTable *ht, char *arKey, uint nKeyLength)
{
int retval;
begin_read(ht);
retval = zend_hash_exists(TS_HASH(ht), arKey, nKeyLength);
end_read(ht);
return retval;
}
| @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,914 | ZEND_API void zend_ts_hash_merge_ex(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, uint size, merge_checker_func_t pMergeSource, void *pParam)
{
begin_read(source);
begin_write(target);
zend_hash_merge_ex(TS_HASH(target), TS_HASH(source), pCopyConstructor, size, pMergeSource, pParam);
... | DoS | 0 | ZEND_API void zend_ts_hash_merge_ex(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, uint size, merge_checker_func_t pMergeSource, void *pParam)
{
begin_read(source);
begin_write(target);
zend_hash_merge_ex(TS_HASH(target), TS_HASH(source), pCopyConstructor, size, pMergeSource, pParam);
... | @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,915 | ZEND_API int zend_ts_hash_minmax(TsHashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC)
{
int retval;
begin_read(ht);
retval = zend_hash_minmax(TS_HASH(ht), compar, flag, pData TSRMLS_CC);
end_read(ht);
return retval;
}
| DoS | 0 | ZEND_API int zend_ts_hash_minmax(TsHashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC)
{
int retval;
begin_read(ht);
retval = zend_hash_minmax(TS_HASH(ht), compar, flag, pData TSRMLS_CC);
end_read(ht);
return retval;
}
| @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,916 | ZEND_API void zend_ts_hash_reverse_apply(TsHashTable *ht, apply_func_t apply_func TSRMLS_DC)
{
begin_write(ht);
zend_hash_reverse_apply(TS_HASH(ht), apply_func TSRMLS_CC);
end_write(ht);
}
| DoS | 0 | ZEND_API void zend_ts_hash_reverse_apply(TsHashTable *ht, apply_func_t apply_func TSRMLS_DC)
{
begin_write(ht);
zend_hash_reverse_apply(TS_HASH(ht), apply_func TSRMLS_CC);
end_write(ht);
}
| @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,917 | ZEND_API int zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber TSRMLS_DC)
{
int retval;
begin_write(ht);
retval = zend_hash_sort(TS_HASH(ht), sort_func, compare_func, renumber TSRMLS_CC);
end_write(ht);
return retval;
}
| DoS | 0 | ZEND_API int zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber TSRMLS_DC)
{
int retval;
begin_write(ht);
retval = zend_hash_sort(TS_HASH(ht), sort_func, compare_func, renumber TSRMLS_CC);
end_write(ht);
return retval;
}
| @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,918 | ZEND_API int _zend_ts_hash_init(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
{
#ifdef ZTS
ht->mx_reader = tsrm_mutex_alloc();
ht->mx_writer = tsrm_mutex_alloc();
ht->reader = 0;
#endif
return _zend_hash_init(TS_HASH(ht), nSize, pDestructor, persistent ZEND_FILE_LINE_... | DoS | 0 | ZEND_API int _zend_ts_hash_init(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
{
#ifdef ZTS
ht->mx_reader = tsrm_mutex_alloc();
ht->mx_writer = tsrm_mutex_alloc();
ht->reader = 0;
#endif
return _zend_hash_init(TS_HASH(ht), nSize, pDestructor, persistent ZEND_FILE_LINE_... | @@ -151,7 +151,7 @@ ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
#ifdef ZTS
tsrm_mutex_free(ht->mx_reader);
- tsrm_mutex_free(ht->mx_reader);
+ tsrm_mutex_free(ht->mx_writer);
#endif
} | null | null | null |
5,919 | bool DBusHelperProxy::isCallerAuthorized(const QString &action, const QByteArray &callerID)
{
switch (BackendsManager::authBackend()->extraCallerIDVerificationMethod()) {
case AuthBackend::NoExtraCallerIDVerificationMethod:
break;
case AuthBackend::VerifyAgainstDBusServiceName:
... | null | 0 | bool DBusHelperProxy::isCallerAuthorized(const QString &action, const QByteArray &callerID)
{
switch (BackendsManager::authBackend()->extraCallerIDVerificationMethod()) {
case AuthBackend::NoExtraCallerIDVerificationMethod:
break;
case AuthBackend::VerifyAgainstDBusServiceName:
... | @@ -31,6 +31,8 @@
#include "kf5authadaptor.h"
#include "kauthdebug.h"
+extern Q_CORE_EXPORT const QMetaTypeInterface *qMetaTypeGuiHelper;
+
namespace KAuth
{
@@ -229,10 +231,17 @@ QByteArray DBusHelperProxy::performAction(const QString &action, const QByteArra
return ActionReply::HelperBusyReply().seri... | CWE-20 | null | null |
5,920 | QByteArray DBusHelperProxy::performAction(const QString &action, const QByteArray &callerID, QByteArray arguments)
{
if (!responder) {
return ActionReply::NoResponderReply().serialized();
}
if (!m_currentAction.isEmpty()) {
return ActionReply::HelperBusyReply().serialized();
}
... | null | 0 | QByteArray DBusHelperProxy::performAction(const QString &action, const QByteArray &callerID, QByteArray arguments)
{
if (!responder) {
return ActionReply::NoResponderReply().serialized();
}
if (!m_currentAction.isEmpty()) {
return ActionReply::HelperBusyReply().serialized();
}
... | @@ -31,6 +31,8 @@
#include "kf5authadaptor.h"
#include "kauthdebug.h"
+extern Q_CORE_EXPORT const QMetaTypeInterface *qMetaTypeGuiHelper;
+
namespace KAuth
{
@@ -229,10 +231,17 @@ QByteArray DBusHelperProxy::performAction(const QString &action, const QByteArra
return ActionReply::HelperBusyReply().seri... | CWE-20 | null | null |
5,921 | void DBusHelperProxy::setHelperResponder(QObject *o)
{
responder = o;
}
| null | 0 | void DBusHelperProxy::setHelperResponder(QObject *o)
{
responder = o;
}
| @@ -31,6 +31,8 @@
#include "kf5authadaptor.h"
#include "kauthdebug.h"
+extern Q_CORE_EXPORT const QMetaTypeInterface *qMetaTypeGuiHelper;
+
namespace KAuth
{
@@ -229,10 +231,17 @@ QByteArray DBusHelperProxy::performAction(const QString &action, const QByteArra
return ActionReply::HelperBusyReply().seri... | CWE-20 | null | null |
5,922 | void DBusHelperProxy::stopAction(const QString &action, const QString &helperID)
{
QDBusMessage message;
message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.kf5auth"), QLatin1String("stopAction"));
QList<QVariant> args;
args << action;
message.setArguments(... | null | 0 | void DBusHelperProxy::stopAction(const QString &action, const QString &helperID)
{
QDBusMessage message;
message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.kf5auth"), QLatin1String("stopAction"));
QList<QVariant> args;
args << action;
message.setArguments(... | @@ -31,6 +31,8 @@
#include "kf5authadaptor.h"
#include "kauthdebug.h"
+extern Q_CORE_EXPORT const QMetaTypeInterface *qMetaTypeGuiHelper;
+
namespace KAuth
{
@@ -229,10 +231,17 @@ QByteArray DBusHelperProxy::performAction(const QString &action, const QByteArra
return ActionReply::HelperBusyReply().seri... | CWE-20 | null | null |
5,923 | t1_decoder_done( T1_Decoder decoder )
{
t1_builder_done( &decoder->builder );
}
| Overflow | 0 | t1_decoder_done( T1_Decoder decoder )
{
t1_builder_done( &decoder->builder );
}
| @@ -780,10 +780,19 @@
/* point without adding any point to the outline */
idx = decoder->num_flex_vectors++;
if ( idx > 0 && idx < 7 )
+ {
+ /* in malformed fonts it is possible to have other */
+ /* opcodes in the middle of a flex (which do... | CWE-787 | null | null |
5,924 | t1_decoder_init( T1_Decoder decoder,
FT_Face face,
FT_Size size,
FT_GlyphSlot slot,
FT_Byte** glyph_names,
PS_Blend blend,
FT_Bool ... | Overflow | 0 | t1_decoder_init( T1_Decoder decoder,
FT_Face face,
FT_Size size,
FT_GlyphSlot slot,
FT_Byte** glyph_names,
PS_Blend blend,
FT_Bool ... | @@ -780,10 +780,19 @@
/* point without adding any point to the outline */
idx = decoder->num_flex_vectors++;
if ( idx > 0 && idx < 7 )
+ {
+ /* in malformed fonts it is possible to have other */
+ /* opcodes in the middle of a flex (which do... | CWE-787 | null | null |
5,925 | t1_decoder_parse_glyph( T1_Decoder decoder,
FT_UInt glyph )
{
return decoder->parse_callback( decoder, glyph );
}
| Overflow | 0 | t1_decoder_parse_glyph( T1_Decoder decoder,
FT_UInt glyph )
{
return decoder->parse_callback( decoder, glyph );
}
| @@ -780,10 +780,19 @@
/* point without adding any point to the outline */
idx = decoder->num_flex_vectors++;
if ( idx > 0 && idx < 7 )
+ {
+ /* in malformed fonts it is possible to have other */
+ /* opcodes in the middle of a flex (which do... | CWE-787 | null | null |
5,926 | t1_lookup_glyph_by_stdcharcode( T1_Decoder decoder,
FT_Int charcode )
{
FT_UInt n;
const FT_String* glyph_name;
FT_Service_PsCMaps psnames = decoder->psnames;
/* check range of standard char code */
if ( charcode < 0 || charcode > 255 )
... | Overflow | 0 | t1_lookup_glyph_by_stdcharcode( T1_Decoder decoder,
FT_Int charcode )
{
FT_UInt n;
const FT_String* glyph_name;
FT_Service_PsCMaps psnames = decoder->psnames;
/* check range of standard char code */
if ( charcode < 0 || charcode > 255 )
... | @@ -780,10 +780,19 @@
/* point without adding any point to the outline */
idx = decoder->num_flex_vectors++;
if ( idx > 0 && idx < 7 )
+ {
+ /* in malformed fonts it is possible to have other */
+ /* opcodes in the middle of a flex (which do... | CWE-787 | null | null |
5,927 | t1operator_seac( T1_Decoder decoder,
FT_Pos asb,
FT_Pos adx,
FT_Pos ady,
FT_Int bchar,
FT_Int achar )
{
FT_Error error;
FT_Int bchar_index, achar_index;
#if 0
FT_Int n... | Overflow | 0 | t1operator_seac( T1_Decoder decoder,
FT_Pos asb,
FT_Pos adx,
FT_Pos ady,
FT_Int bchar,
FT_Int achar )
{
FT_Error error;
FT_Int bchar_index, achar_index;
#if 0
FT_Int n... | @@ -780,10 +780,19 @@
/* point without adding any point to the outline */
idx = decoder->num_flex_vectors++;
if ( idx > 0 && idx < 7 )
+ {
+ /* in malformed fonts it is possible to have other */
+ /* opcodes in the middle of a flex (which do... | CWE-787 | null | null |
5,928 | static ssize_t flistxattrat_nofollow(int dirfd, const char *filename,
char *list, size_t size)
{
char *proc_path = g_strdup_printf("/proc/self/fd/%d/%s", dirfd, filename);
int ret;
ret = llistxattr(proc_path, list, size);
g_free(proc_path);
return ret;
}
| DoS | 0 | static ssize_t flistxattrat_nofollow(int dirfd, const char *filename,
char *list, size_t size)
{
char *proc_path = g_strdup_printf("/proc/self/fd/%d/%s", dirfd, filename);
int ret;
ret = llistxattr(proc_path, list, size);
g_free(proc_path);
return ret;
}
| @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,929 | static ssize_t fremovexattrat_nofollow(int dirfd, const char *filename,
const char *name)
{
char *proc_path = g_strdup_printf("/proc/self/fd/%d/%s", dirfd, filename);
int ret;
ret = lremovexattr(proc_path, name);
g_free(proc_path);
return ret;
}
| DoS | 0 | static ssize_t fremovexattrat_nofollow(int dirfd, const char *filename,
const char *name)
{
char *proc_path = g_strdup_printf("/proc/self/fd/%d/%s", dirfd, filename);
int ret;
ret = lremovexattr(proc_path, name);
g_free(proc_path);
return ret;
}
| @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,930 | int fsetxattrat_nofollow(int dirfd, const char *filename, const char *name,
void *value, size_t size, int flags)
{
char *proc_path = g_strdup_printf("/proc/self/fd/%d/%s", dirfd, filename);
int ret;
ret = lsetxattr(proc_path, name, value, size, flags);
g_free(proc_path);
re... | DoS | 0 | int fsetxattrat_nofollow(int dirfd, const char *filename, const char *name,
void *value, size_t size, int flags)
{
char *proc_path = g_strdup_printf("/proc/self/fd/%d/%s", dirfd, filename);
int ret;
ret = lsetxattr(proc_path, name, value, size, flags);
g_free(proc_path);
re... | @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,931 | static XattrOperations *get_xattr_operations(XattrOperations **h,
const char *name)
{
XattrOperations *xops;
for (xops = *(h)++; xops != NULL; xops = *(h)++) {
if (!strncmp(name, xops->name, strlen(xops->name))) {
return xops;
}
}
... | DoS | 0 | static XattrOperations *get_xattr_operations(XattrOperations **h,
const char *name)
{
XattrOperations *xops;
for (xops = *(h)++; xops != NULL; xops = *(h)++) {
if (!strncmp(name, xops->name, strlen(xops->name))) {
return xops;
}
}
... | @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,932 | ssize_t local_getxattr_nofollow(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
char *dirpath = g_path_get_dirname(path);
char *filename = g_path_get_basename(path);
int dirfd;
ssize_t ret = -1;
dirfd = local_opendir_nofollow(ctx, dirp... | DoS | 0 | ssize_t local_getxattr_nofollow(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
char *dirpath = g_path_get_dirname(path);
char *filename = g_path_get_basename(path);
int dirfd;
ssize_t ret = -1;
dirfd = local_opendir_nofollow(ctx, dirp... | @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,933 | ssize_t local_removexattr_nofollow(FsContext *ctx, const char *path,
const char *name)
{
char *dirpath = g_path_get_dirname(path);
char *filename = g_path_get_basename(path);
int dirfd;
ssize_t ret = -1;
dirfd = local_opendir_nofollow(ctx, dirpath);
if (dirfd ... | DoS | 0 | ssize_t local_removexattr_nofollow(FsContext *ctx, const char *path,
const char *name)
{
char *dirpath = g_path_get_dirname(path);
char *filename = g_path_get_basename(path);
int dirfd;
ssize_t ret = -1;
dirfd = local_opendir_nofollow(ctx, dirpath);
if (dirfd ... | @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,934 | ssize_t notsup_getxattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size)
{
errno = ENOTSUP;
return -1;
}
| DoS | 0 | ssize_t notsup_getxattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size)
{
errno = ENOTSUP;
return -1;
}
| @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,935 | ssize_t notsup_listxattr(FsContext *ctx, const char *path, char *name,
void *value, size_t size)
{
return 0;
}
| DoS | 0 | ssize_t notsup_listxattr(FsContext *ctx, const char *path, char *name,
void *value, size_t size)
{
return 0;
}
| @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,936 | int notsup_setxattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size, int flags)
{
errno = ENOTSUP;
return -1;
}
| DoS | 0 | int notsup_setxattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size, int flags)
{
errno = ENOTSUP;
return -1;
}
| @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,937 | ssize_t pt_getxattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size)
{
return local_getxattr_nofollow(ctx, path, name, value, size);
}
| DoS | 0 | ssize_t pt_getxattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size)
{
return local_getxattr_nofollow(ctx, path, name, value, size);
}
| @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,938 | ssize_t pt_listxattr(FsContext *ctx, const char *path,
char *name, void *value, size_t size)
{
int name_size = strlen(name) + 1;
if (!value) {
return name_size;
}
if (size < name_size) {
errno = ERANGE;
return -1;
}
/* no need for strncpy: name_size... | DoS | 0 | ssize_t pt_listxattr(FsContext *ctx, const char *path,
char *name, void *value, size_t size)
{
int name_size = strlen(name) + 1;
if (!value) {
return name_size;
}
if (size < name_size) {
errno = ERANGE;
return -1;
}
/* no need for strncpy: name_size... | @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,939 | int pt_removexattr(FsContext *ctx, const char *path, const char *name)
{
return local_removexattr_nofollow(ctx, path, name);
}
| DoS | 0 | int pt_removexattr(FsContext *ctx, const char *path, const char *name)
{
return local_removexattr_nofollow(ctx, path, name);
}
| @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,940 | ssize_t v9fs_get_xattr(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
XattrOperations *xops = get_xattr_operations(ctx->xops, name);
if (xops) {
return xops->getxattr(ctx, path, name, value, size);
}
errno = EOPNOTSUPP;
return -1;
}
| DoS | 0 | ssize_t v9fs_get_xattr(FsContext *ctx, const char *path,
const char *name, void *value, size_t size)
{
XattrOperations *xops = get_xattr_operations(ctx->xops, name);
if (xops) {
return xops->getxattr(ctx, path, name, value, size);
}
errno = EOPNOTSUPP;
return -1;
}
| @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,941 | int v9fs_remove_xattr(FsContext *ctx,
const char *path, const char *name)
{
XattrOperations *xops = get_xattr_operations(ctx->xops, name);
if (xops) {
return xops->removexattr(ctx, path, name);
}
errno = EOPNOTSUPP;
return -1;
}
| DoS | 0 | int v9fs_remove_xattr(FsContext *ctx,
const char *path, const char *name)
{
XattrOperations *xops = get_xattr_operations(ctx->xops, name);
if (xops) {
return xops->removexattr(ctx, path, name);
}
errno = EOPNOTSUPP;
return -1;
}
| @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,942 | int v9fs_set_xattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size, int flags)
{
XattrOperations *xops = get_xattr_operations(ctx->xops, name);
if (xops) {
return xops->setxattr(ctx, path, name, value, size, flags);
}
errno = EOPNOTSUPP;
return... | DoS | 0 | int v9fs_set_xattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size, int flags)
{
XattrOperations *xops = get_xattr_operations(ctx->xops, name);
if (xops) {
return xops->setxattr(ctx, path, name, value, size, flags);
}
errno = EOPNOTSUPP;
return... | @@ -108,6 +108,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
g_free(name);
close_preserve_errno(dirfd);
if (xattr_len < 0) {
+ g_free(orig_value);
return -1;
} | CWE-772 | null | null |
5,943 | _dbus_validate_signature_with_reason (const DBusString *type_str,
int type_pos,
int len)
{
const unsigned char *p;
const unsigned char *end;
int last;
int struct_depth;
int array_depth;
int dict_entry_dep... | DoS | 0 | _dbus_validate_signature_with_reason (const DBusString *type_str,
int type_pos,
int len)
{
const unsigned char *p;
const unsigned char *end;
int last;
int struct_depth;
int array_depth;
int dict_entry_dep... | @@ -291,16 +291,30 @@ out:
return result;
}
+/* note: this function is also used to validate the header's values,
+ * since the header is a valid body with a particular signature.
+ */
static DBusValidity
validate_body_helper (DBusTypeReader *reader,
int byte_order... | CWE-399 | null | null |
5,944 | generate_from_message (DBusString *data,
DBusValidity *expected_validity,
DBusMessage *message)
{
dbus_message_set_serial (message, 1);
dbus_message_lock (message);
*expected_validity = DBUS_VALID;
/* move for efficiency, since we'l... | DoS | 0 | generate_from_message (DBusString *data,
DBusValidity *expected_validity,
DBusMessage *message)
{
dbus_message_set_serial (message, 1);
dbus_message_lock (message);
*expected_validity = DBUS_VALID;
/* move for efficiency, since we'l... | @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,945 | generate_many_bodies (DBusMessageDataIter *iter,
DBusString *data,
DBusValidity *expected_validity)
{
return generate_outer (iter, data, expected_validity,
generate_many_bodies_inner);
}
| DoS | 0 | generate_many_bodies (DBusMessageDataIter *iter,
DBusString *data,
DBusValidity *expected_validity)
{
return generate_outer (iter, data, expected_validity,
generate_many_bodies_inner);
}
| @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,946 | generate_many_bodies_inner (DBusMessageDataIter *iter,
DBusMessage **message_p)
{
DBusMessage *message;
DBusString signature;
DBusString body;
/* Keeping this small makes things go faster */
message = dbus_message_new_method_call ("o.z.F",
... | DoS | 0 | generate_many_bodies_inner (DBusMessageDataIter *iter,
DBusMessage **message_p)
{
DBusMessage *message;
DBusString signature;
DBusString body;
/* Keeping this small makes things go faster */
message = dbus_message_new_method_call ("o.z.F",
... | @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,947 | generate_trivial (DBusMessageDataIter *iter,
DBusString *data,
DBusValidity *expected_validity)
{
return generate_outer (iter, data, expected_validity,
generate_trivial_inner);
}
| DoS | 0 | generate_trivial (DBusMessageDataIter *iter,
DBusString *data,
DBusValidity *expected_validity)
{
return generate_outer (iter, data, expected_validity,
generate_trivial_inner);
}
| @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,948 | generate_trivial_inner (DBusMessageDataIter *iter,
DBusMessage **message_p)
{
DBusMessage *message;
switch (iter_get_sequence (iter))
{
case 0:
message = dbus_message_new_method_call ("org.freedesktop.TextEditor",
"/foo/bar"... | DoS | 0 | generate_trivial_inner (DBusMessageDataIter *iter,
DBusMessage **message_p)
{
DBusMessage *message;
switch (iter_get_sequence (iter))
{
case 0:
message = dbus_message_new_method_call ("org.freedesktop.TextEditor",
"/foo/bar"... | @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,949 | iter_first_in_series (DBusMessageDataIter *iter)
{
int i;
i = iter->depth;
while (i < _DBUS_MESSAGE_DATA_MAX_NESTING)
{
if (iter->sequence_nos[i] != 0)
return FALSE;
++i;
}
return TRUE;
}
| DoS | 0 | iter_first_in_series (DBusMessageDataIter *iter)
{
int i;
i = iter->depth;
while (i < _DBUS_MESSAGE_DATA_MAX_NESTING)
{
if (iter->sequence_nos[i] != 0)
return FALSE;
++i;
}
return TRUE;
}
| @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,950 | iter_get_sequence (DBusMessageDataIter *iter)
{
_dbus_assert (iter->sequence_nos[iter->depth] >= 0);
return iter->sequence_nos[iter->depth];
}
| DoS | 0 | iter_get_sequence (DBusMessageDataIter *iter)
{
_dbus_assert (iter->sequence_nos[iter->depth] >= 0);
return iter->sequence_nos[iter->depth];
}
| @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,951 | iter_next (DBusMessageDataIter *iter)
{
iter->sequence_nos[iter->depth] += 1;
}
| DoS | 0 | iter_next (DBusMessageDataIter *iter)
{
iter->sequence_nos[iter->depth] += 1;
}
| @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,952 | iter_recurse (DBusMessageDataIter *iter)
{
iter->depth += 1;
_dbus_assert (iter->depth < _DBUS_MESSAGE_DATA_MAX_NESTING);
_dbus_assert (iter->sequence_nos[iter->depth] >= 0);
}
| DoS | 0 | iter_recurse (DBusMessageDataIter *iter)
{
iter->depth += 1;
_dbus_assert (iter->depth < _DBUS_MESSAGE_DATA_MAX_NESTING);
_dbus_assert (iter->sequence_nos[iter->depth] >= 0);
}
| @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,953 | iter_set_sequence (DBusMessageDataIter *iter,
int sequence)
{
_dbus_assert (sequence >= 0);
iter->sequence_nos[iter->depth] = sequence;
}
| DoS | 0 | iter_set_sequence (DBusMessageDataIter *iter,
int sequence)
{
_dbus_assert (sequence >= 0);
iter->sequence_nos[iter->depth] = sequence;
}
| @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,954 | iter_unrecurse (DBusMessageDataIter *iter)
{
iter->depth -= 1;
_dbus_assert (iter->depth >= 0);
}
| DoS | 0 | iter_unrecurse (DBusMessageDataIter *iter)
{
iter->depth -= 1;
_dbus_assert (iter->depth >= 0);
}
| @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,955 | set_reply_serial (DBusMessage *message)
{
if (message == NULL)
_dbus_assert_not_reached ("oom");
if (!dbus_message_set_reply_serial (message, 100))
_dbus_assert_not_reached ("oom");
}
| DoS | 0 | set_reply_serial (DBusMessage *message)
{
if (message == NULL)
_dbus_assert_not_reached ("oom");
if (!dbus_message_set_reply_serial (message, 100))
_dbus_assert_not_reached ("oom");
}
| @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,956 | simple_error (void)
{
DBusMessage *message;
message = dbus_message_new (DBUS_MESSAGE_TYPE_ERROR);
if (message == NULL)
_dbus_assert_not_reached ("oom");
if (!dbus_message_set_error_name (message, "foo.bar"))
_dbus_assert_not_reached ("oom");
set_reply_serial (message);
return message;
}
| DoS | 0 | simple_error (void)
{
DBusMessage *message;
message = dbus_message_new (DBUS_MESSAGE_TYPE_ERROR);
if (message == NULL)
_dbus_assert_not_reached ("oom");
if (!dbus_message_set_error_name (message, "foo.bar"))
_dbus_assert_not_reached ("oom");
set_reply_serial (message);
return message;
}
| @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,957 | simple_method_return (void)
{
DBusMessage *message;
message = dbus_message_new (DBUS_MESSAGE_TYPE_METHOD_RETURN);
if (message == NULL)
_dbus_assert_not_reached ("oom");
set_reply_serial (message);
return message;
}
| DoS | 0 | simple_method_return (void)
{
DBusMessage *message;
message = dbus_message_new (DBUS_MESSAGE_TYPE_METHOD_RETURN);
if (message == NULL)
_dbus_assert_not_reached ("oom");
set_reply_serial (message);
return message;
}
| @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,958 | simple_signal (void)
{
DBusMessage *message;
message = dbus_message_new_signal ("/f/b",
"o.b.Z",
"Fro");
if (message == NULL)
_dbus_assert_not_reached ("oom");
return message;
}
| DoS | 0 | simple_signal (void)
{
DBusMessage *message;
message = dbus_message_new_signal ("/f/b",
"o.b.Z",
"Fro");
if (message == NULL)
_dbus_assert_not_reached ("oom");
return message;
}
| @@ -333,6 +333,53 @@ simple_error (void)
return message;
}
+static DBusMessage*
+message_with_nesting_levels (int levels)
+{
+ DBusMessage *message;
+ dbus_int32_t v_INT32;
+ DBusMessageIter *parents;
+ DBusMessageIter *children;
+ int i;
+
+ /* If levels is higher it breaks sig_refcount in DBusMessageRealI... | CWE-399 | null | null |
5,959 | tt_check_single_notdef( FT_Face ttface )
{
FT_Bool result = FALSE;
TT_Face face = (TT_Face)ttface;
FT_UInt asize;
FT_ULong i;
FT_ULong glyph_index = 0;
FT_UInt count = 0;
for( i = 0; i < face->num_locations; i++ )
{
tt_face_get_location( face, i, &asize );
... | Overflow | 0 | tt_check_single_notdef( FT_Face ttface )
{
FT_Bool result = FALSE;
TT_Face face = (TT_Face)ttface;
FT_UInt asize;
FT_ULong i;
FT_ULong glyph_index = 0;
FT_UInt count = 0;
for( i = 0; i < face->num_locations; i++ )
{
tt_face_get_location( face, i, &asize );
... | @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,960 | tt_check_trickyness( FT_Face face )
{
if ( !face )
return FALSE;
/* For first, check the face name for quick check. */
if ( face->family_name &&
tt_check_trickyness_family( face->family_name ) )
return TRUE;
/* Type42 fonts may lack `name' tables... | Overflow | 0 | tt_check_trickyness( FT_Face face )
{
if ( !face )
return FALSE;
/* For first, check the face name for quick check. */
if ( face->family_name &&
tt_check_trickyness_family( face->family_name ) )
return TRUE;
/* Type42 fonts may lack `name' tables... | @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,961 | tt_driver_done( FT_Module ttdriver ) /* TT_Driver */
{
FT_UNUSED( ttdriver );
}
| Overflow | 0 | tt_driver_done( FT_Module ttdriver ) /* TT_Driver */
{
FT_UNUSED( ttdriver );
}
| @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,962 | tt_driver_init( FT_Module ttdriver ) /* TT_Driver */
{
#ifdef TT_USE_BYTECODE_INTERPRETER
TT_Driver driver = (TT_Driver)ttdriver;
driver->interpreter_version = TT_INTERPRETER_VERSION_35;
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
driver->interpreter_version = TT_INTERPRETER_VERSION_38;
#endi... | Overflow | 0 | tt_driver_init( FT_Module ttdriver ) /* TT_Driver */
{
#ifdef TT_USE_BYTECODE_INTERPRETER
TT_Driver driver = (TT_Driver)ttdriver;
driver->interpreter_version = TT_INTERPRETER_VERSION_35;
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
driver->interpreter_version = TT_INTERPRETER_VERSION_38;
#endi... | @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,963 | tt_face_init( FT_Stream stream,
FT_Face ttface, /* TT_Face */
FT_Int face_index,
FT_Int num_params,
FT_Parameter* params )
{
FT_Error error;
FT_Library library;
SFNT_Service sfnt;
TT_Face ... | Overflow | 0 | tt_face_init( FT_Stream stream,
FT_Face ttface, /* TT_Face */
FT_Int face_index,
FT_Int num_params,
FT_Parameter* params )
{
FT_Error error;
FT_Library library;
SFNT_Service sfnt;
TT_Face ... | @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,964 | tt_get_sfnt_checksum( TT_Face face,
FT_UShort i )
{
#if 0 /* if we believe the written value, use following part. */
if ( face->dir_tables[i].CheckSum )
return face->dir_tables[i].CheckSum;
#endif
if ( !face->goto_table )
return 0;
if ( face->goto_table( face,
... | Overflow | 0 | tt_get_sfnt_checksum( TT_Face face,
FT_UShort i )
{
#if 0 /* if we believe the written value, use following part. */
if ( face->dir_tables[i].CheckSum )
return face->dir_tables[i].CheckSum;
#endif
if ( !face->goto_table )
return 0;
if ( face->goto_table( face,
... | @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,965 | tt_glyphzone_done( TT_GlyphZone zone )
{
FT_Memory memory = zone->memory;
if ( memory )
{
FT_FREE( zone->contours );
FT_FREE( zone->tags );
FT_FREE( zone->cur );
FT_FREE( zone->org );
FT_FREE( zone->orus );
zone->max_points = zone->n_points = 0;
zone->m... | Overflow | 0 | tt_glyphzone_done( TT_GlyphZone zone )
{
FT_Memory memory = zone->memory;
if ( memory )
{
FT_FREE( zone->contours );
FT_FREE( zone->tags );
FT_FREE( zone->cur );
FT_FREE( zone->org );
FT_FREE( zone->orus );
zone->max_points = zone->n_points = 0;
zone->m... | @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,966 | tt_size_done( FT_Size ttsize ) /* TT_Size */
{
TT_Size size = (TT_Size)ttsize;
#ifdef TT_USE_BYTECODE_INTERPRETER
tt_size_done_bytecode( ttsize );
#endif
size->ttmetrics.valid = FALSE;
}
| Overflow | 0 | tt_size_done( FT_Size ttsize ) /* TT_Size */
{
TT_Size size = (TT_Size)ttsize;
#ifdef TT_USE_BYTECODE_INTERPRETER
tt_size_done_bytecode( ttsize );
#endif
size->ttmetrics.valid = FALSE;
}
| @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,967 | tt_size_init( FT_Size ttsize ) /* TT_Size */
{
TT_Size size = (TT_Size)ttsize;
FT_Error error = FT_Err_Ok;
#ifdef TT_USE_BYTECODE_INTERPRETER
size->bytecode_ready = -1;
size->cvt_ready = -1;
#endif
size->ttmetrics.valid = FALSE;
size->strike_index = 0xFFFFFFFFUL;
... | Overflow | 0 | tt_size_init( FT_Size ttsize ) /* TT_Size */
{
TT_Size size = (TT_Size)ttsize;
FT_Error error = FT_Err_Ok;
#ifdef TT_USE_BYTECODE_INTERPRETER
size->bytecode_ready = -1;
size->cvt_ready = -1;
#endif
size->ttmetrics.valid = FALSE;
size->strike_index = 0xFFFFFFFFUL;
... | @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,968 | tt_size_init_bytecode( FT_Size ftsize,
FT_Bool pedantic )
{
FT_Error error;
TT_Size size = (TT_Size)ftsize;
TT_Face face = (TT_Face)ftsize->face;
FT_Memory memory = face->root.memory;
FT_UShort n_twilight;
TT_MaxProfile* maxp = &face->max_profile;
... | Overflow | 0 | tt_size_init_bytecode( FT_Size ftsize,
FT_Bool pedantic )
{
FT_Error error;
TT_Size size = (TT_Size)ftsize;
TT_Face face = (TT_Face)ftsize->face;
FT_Memory memory = face->root.memory;
FT_UShort n_twilight;
TT_MaxProfile* maxp = &face->max_profile;
... | @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,969 | tt_size_ready_bytecode( TT_Size size,
FT_Bool pedantic )
{
FT_Error error = FT_Err_Ok;
if ( size->bytecode_ready < 0 )
error = tt_size_init_bytecode( (FT_Size)size, pedantic );
else
error = size->bytecode_ready;
if ( error )
goto Exit;
/* rescal... | Overflow | 0 | tt_size_ready_bytecode( TT_Size size,
FT_Bool pedantic )
{
FT_Error error = FT_Err_Ok;
if ( size->bytecode_ready < 0 )
error = tt_size_init_bytecode( (FT_Size)size, pedantic );
else
error = size->bytecode_ready;
if ( error )
goto Exit;
/* rescal... | @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,970 | tt_size_run_fpgm( TT_Size size,
FT_Bool pedantic )
{
TT_Face face = (TT_Face)size->root.face;
TT_ExecContext exec;
FT_Error error;
exec = size->context;
error = TT_Load_Context( exec, face, size );
if ( error )
return error;
exec->callTop =... | Overflow | 0 | tt_size_run_fpgm( TT_Size size,
FT_Bool pedantic )
{
TT_Face face = (TT_Face)size->root.face;
TT_ExecContext exec;
FT_Error error;
exec = size->context;
error = TT_Load_Context( exec, face, size );
if ( error )
return error;
exec->callTop =... | @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,971 | tt_size_run_prep( TT_Size size,
FT_Bool pedantic )
{
TT_Face face = (TT_Face)size->root.face;
TT_ExecContext exec;
FT_Error error;
exec = size->context;
error = TT_Load_Context( exec, face, size );
if ( error )
return error;
exec->callTop =... | Overflow | 0 | tt_size_run_prep( TT_Size size,
FT_Bool pedantic )
{
TT_Face face = (TT_Face)size->root.face;
TT_ExecContext exec;
FT_Error error;
exec = size->context;
error = TT_Load_Context( exec, face, size );
if ( error )
return error;
exec->callTop =... | @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,972 | tt_slot_init( FT_GlyphSlot slot )
{
return FT_GlyphLoader_CreateExtra( slot->internal->loader );
}
| Overflow | 0 | tt_slot_init( FT_GlyphSlot slot )
{
return FT_GlyphLoader_CreateExtra( slot->internal->loader );
}
| @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,973 | tt_synth_sfnt_checksum( FT_Stream stream,
FT_ULong length )
{
FT_Error error;
FT_UInt32 checksum = 0;
FT_UInt i;
if ( FT_FRAME_ENTER( length ) )
return 0;
for ( ; length > 3; length -= 4 )
checksum += (FT_UInt32)FT_GET_ULONG();
for ( i = 3; ... | Overflow | 0 | tt_synth_sfnt_checksum( FT_Stream stream,
FT_ULong length )
{
FT_Error error;
FT_UInt32 checksum = 0;
FT_UInt i;
if ( FT_FRAME_ENTER( length ) )
return 0;
for ( ; length > 3; length -= 4 )
checksum += (FT_UInt32)FT_GET_ULONG();
for ( i = 3; ... | @@ -1212,10 +1212,14 @@
FT_Size_Metrics* metrics;
- size->ttmetrics.valid = FALSE;
-
face = (TT_Face)size->root.face;
+ /* nothing to do for CFF2 */
+ if ( face->isCFF2 )
+ return FT_Err_Ok;
+
+ size->ttmetrics.valid = FALSE;
+
metrics = &size->metrics;
/* copy the result f... | CWE-787 | null | null |
5,974 | sfnt_stream_close( FT_Stream stream )
{
FT_Memory memory = stream->memory;
FT_FREE( stream->base );
stream->size = 0;
stream->base = NULL;
stream->close = NULL;
}
| null | 0 | sfnt_stream_close( FT_Stream stream )
{
FT_Memory memory = stream->memory;
FT_FREE( stream->base );
stream->size = 0;
stream->base = NULL;
stream->close = NULL;
}
| @@ -999,10 +999,6 @@
else
face->variation_support |= TT_FACE_FLAG_VAR_FVAR;
- /* we don't support Multiple Master CFFs yet */
- if ( !face->goto_table( face, TTAG_CFF, stream, 0 ) )
- num_instances = 0;
-
/*
* As documented in the OpenType specification, an entry for t... | CWE-787 | null | null |
5,975 | tt_name_ascii_from_other( TT_Name entry,
FT_Memory memory )
{
FT_String* string = NULL;
FT_UInt len, code, n;
FT_Byte* read = (FT_Byte*)entry->string;
FT_Error error;
len = (FT_UInt)entry->stringLength;
if ( FT_NEW_ARRAY( string, len + 1 ) )
... | null | 0 | tt_name_ascii_from_other( TT_Name entry,
FT_Memory memory )
{
FT_String* string = NULL;
FT_UInt len, code, n;
FT_Byte* read = (FT_Byte*)entry->string;
FT_Error error;
len = (FT_UInt)entry->stringLength;
if ( FT_NEW_ARRAY( string, len + 1 ) )
... | @@ -999,10 +999,6 @@
else
face->variation_support |= TT_FACE_FLAG_VAR_FVAR;
- /* we don't support Multiple Master CFFs yet */
- if ( !face->goto_table( face, TTAG_CFF, stream, 0 ) )
- num_instances = 0;
-
/*
* As documented in the OpenType specification, an entry for t... | CWE-787 | null | null |
5,976 | tt_name_ascii_from_utf16( TT_Name entry,
FT_Memory memory )
{
FT_String* string = NULL;
FT_UInt len, code, n;
FT_Byte* read = (FT_Byte*)entry->string;
FT_Error error;
len = (FT_UInt)entry->stringLength / 2;
if ( FT_NEW_ARRAY( string, len + 1 ) ... | null | 0 | tt_name_ascii_from_utf16( TT_Name entry,
FT_Memory memory )
{
FT_String* string = NULL;
FT_UInt len, code, n;
FT_Byte* read = (FT_Byte*)entry->string;
FT_Error error;
len = (FT_UInt)entry->stringLength / 2;
if ( FT_NEW_ARRAY( string, len + 1 ) ... | @@ -999,10 +999,6 @@
else
face->variation_support |= TT_FACE_FLAG_VAR_FVAR;
- /* we don't support Multiple Master CFFs yet */
- if ( !face->goto_table( face, TTAG_CFF, stream, 0 ) )
- num_instances = 0;
-
/*
* As documented in the OpenType specification, an entry for t... | CWE-787 | null | null |
5,977 | woff_open_font( FT_Stream stream,
TT_Face face )
{
FT_Memory memory = stream->memory;
FT_Error error = FT_Err_Ok;
WOFF_HeaderRec woff;
WOFF_Table tables = NULL;
WOFF_Table* indices = NULL;
FT_ULong woff_offset;
FT_Byte* sfnt... | null | 0 | woff_open_font( FT_Stream stream,
TT_Face face )
{
FT_Memory memory = stream->memory;
FT_Error error = FT_Err_Ok;
WOFF_HeaderRec woff;
WOFF_Table tables = NULL;
WOFF_Table* indices = NULL;
FT_ULong woff_offset;
FT_Byte* sfnt... | @@ -999,10 +999,6 @@
else
face->variation_support |= TT_FACE_FLAG_VAR_FVAR;
- /* we don't support Multiple Master CFFs yet */
- if ( !face->goto_table( face, TTAG_CFF, stream, 0 ) )
- num_instances = 0;
-
/*
* As documented in the OpenType specification, an entry for t... | CWE-787 | null | null |
5,978 | sfnt_load_face( FT_Stream stream,
TT_Face face,
FT_Int face_instance_index,
FT_Int num_params,
FT_Parameter* params )
{
FT_Error error;
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
FT_Error psnames_err... | Overflow | 0 | sfnt_load_face( FT_Stream stream,
TT_Face face,
FT_Int face_instance_index,
FT_Int num_params,
FT_Parameter* params )
{
FT_Error error;
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
FT_Error psnames_err... | @@ -1058,8 +1058,10 @@
FT_FREE( default_values );
FT_FREE( instance_values );
- /* we don't support Multiple Master CFFs yet */
+ /* we don't support Multiple Master CFFs yet; */
+ /* note that `glyf' or `CFF2' have precedence */
if ( face->goto_table( face, TTAG_glyf, stream, 0 ) ... | CWE-787 | null | null |
5,979 | void doMergeFormDict(Dict *srcFormDict, Dict *mergeFormDict, int numOffset) {
Object srcFields, mergeFields;
srcFormDict->lookup("Fields", &srcFields);
mergeFormDict->lookup("Fields", &mergeFields);
if (srcFields.isArray() && mergeFields.isArray()) {
for (int i = 0; i < mergeFields.arrayGetLength(); i++) {... | null | 0 | void doMergeFormDict(Dict *srcFormDict, Dict *mergeFormDict, int numOffset) {
Object srcFields, mergeFields;
srcFormDict->lookup("Fields", &srcFields);
mergeFormDict->lookup("Fields", &mergeFields);
if (srcFields.isArray() && mergeFields.isArray()) {
for (int i = 0; i < mergeFields.arrayGetLength(); i++) {... | @@ -7,7 +7,7 @@
// Copyright (C) 2011-2015, 2017 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2012 Arseny Solokha <asolokha@gmx.com>
// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
-// Copyright (C) 2012, 2014 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2012, 2014, 2017 Albert Astals C... | CWE-476 | null | null |
5,980 | void doMergeNameDict(PDFDoc *doc, XRef *srcXRef, XRef *countRef, int oldRefNum, int newRefNum, Dict *srcNameDict, Dict *mergeNameDict, int numOffset) {
for (int i = 0; i < mergeNameDict->getLength(); i++) {
const char *key = mergeNameDict->getKey(i);
Object mergeNameTree;
Object srcNameTree;
mergeName... | null | 0 | void doMergeNameDict(PDFDoc *doc, XRef *srcXRef, XRef *countRef, int oldRefNum, int newRefNum, Dict *srcNameDict, Dict *mergeNameDict, int numOffset) {
for (int i = 0; i < mergeNameDict->getLength(); i++) {
const char *key = mergeNameDict->getKey(i);
Object mergeNameTree;
Object srcNameTree;
mergeName... | @@ -7,7 +7,7 @@
// Copyright (C) 2011-2015, 2017 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2012 Arseny Solokha <asolokha@gmx.com>
// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
-// Copyright (C) 2012, 2014 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2012, 2014, 2017 Albert Astals C... | CWE-476 | null | null |
5,981 | void doMergeNameTree(PDFDoc *doc, XRef *srcXRef, XRef *countRef, int oldRefNum, int newRefNum, Dict *srcNameTree, Dict *mergeNameTree, int numOffset) {
Object mergeNameArray;
Object srcNameArray;
mergeNameTree->lookup("Names", &mergeNameArray);
srcNameTree->lookup("Names", &srcNameArray);
if (mergeNameArray.i... | null | 0 | void doMergeNameTree(PDFDoc *doc, XRef *srcXRef, XRef *countRef, int oldRefNum, int newRefNum, Dict *srcNameTree, Dict *mergeNameTree, int numOffset) {
Object mergeNameArray;
Object srcNameArray;
mergeNameTree->lookup("Names", &mergeNameArray);
srcNameTree->lookup("Names", &srcNameArray);
if (mergeNameArray.i... | @@ -7,7 +7,7 @@
// Copyright (C) 2011-2015, 2017 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2012 Arseny Solokha <asolokha@gmx.com>
// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
-// Copyright (C) 2012, 2014 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2012, 2014, 2017 Albert Astals C... | CWE-476 | null | null |
5,982 | change_env (timezone_t tz)
{
if (setenv_TZ (tz->tz_is_set ? tz->abbrs : NULL) != 0)
return false;
tzset ();
return true;
}
| Overflow | 0 | change_env (timezone_t tz)
{
if (setenv_TZ (tz->tz_is_set ? tz->abbrs : NULL) != 0)
return false;
tzset ();
return true;
}
| @@ -27,6 +27,7 @@
#include <time.h>
#include <errno.h>
+#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
@@ -35,6 +36,10 @@
#include "flexmember.h"
#include "time-internal.h"
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
#if !HAVE_TZSET
static void tzset (void... | CWE-119 | null | null |
5,983 | extend_abbrs (char *abbrs, char const *abbr, size_t abbr_size)
{
memcpy (abbrs, abbr, abbr_size);
abbrs[abbr_size] = '\0';
}
| Overflow | 0 | extend_abbrs (char *abbrs, char const *abbr, size_t abbr_size)
{
memcpy (abbrs, abbr, abbr_size);
abbrs[abbr_size] = '\0';
}
| @@ -27,6 +27,7 @@
#include <time.h>
#include <errno.h>
+#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
@@ -35,6 +36,10 @@
#include "flexmember.h"
#include "time-internal.h"
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
#if !HAVE_TZSET
static void tzset (void... | CWE-119 | null | null |
5,984 | getenv_TZ (void)
{
return getenv ("TZ");
}
| Overflow | 0 | getenv_TZ (void)
{
return getenv ("TZ");
}
| @@ -27,6 +27,7 @@
#include <time.h>
#include <errno.h>
+#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
@@ -35,6 +36,10 @@
#include "flexmember.h"
#include "time-internal.h"
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
#if !HAVE_TZSET
static void tzset (void... | CWE-119 | null | null |
5,985 | isdst_differ (int a, int b)
{
return !a != !b && 0 <= a && 0 <= b;
}
| Overflow | 0 | isdst_differ (int a, int b)
{
return !a != !b && 0 <= a && 0 <= b;
}
| @@ -27,6 +27,7 @@
#include <time.h>
#include <errno.h>
+#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
@@ -35,6 +36,10 @@
#include "flexmember.h"
#include "time-internal.h"
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
#if !HAVE_TZSET
static void tzset (void... | CWE-119 | null | null |
5,986 | localtime_rz (timezone_t tz, time_t const *t, struct tm *tm)
{
if (!tz)
return gmtime_r (t, tm);
else
{
timezone_t old_tz = set_tz (tz);
if (old_tz)
{
bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm);
if (revert_tz (old_tz) && abbr_saved)
return... | Overflow | 0 | localtime_rz (timezone_t tz, time_t const *t, struct tm *tm)
{
if (!tz)
return gmtime_r (t, tm);
else
{
timezone_t old_tz = set_tz (tz);
if (old_tz)
{
bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm);
if (revert_tz (old_tz) && abbr_saved)
return... | @@ -27,6 +27,7 @@
#include <time.h>
#include <errno.h>
+#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
@@ -35,6 +36,10 @@
#include "flexmember.h"
#include "time-internal.h"
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
#if !HAVE_TZSET
static void tzset (void... | CWE-119 | null | null |
5,987 | revert_tz (timezone_t tz)
{
if (tz == local_tz)
return true;
else
{
int saved_errno = errno;
bool ok = change_env (tz);
if (!ok)
saved_errno = errno;
tzfree (tz);
errno = saved_errno;
return ok;
}
}
| Overflow | 0 | revert_tz (timezone_t tz)
{
if (tz == local_tz)
return true;
else
{
int saved_errno = errno;
bool ok = change_env (tz);
if (!ok)
saved_errno = errno;
tzfree (tz);
errno = saved_errno;
return ok;
}
}
| @@ -27,6 +27,7 @@
#include <time.h>
#include <errno.h>
+#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
@@ -35,6 +36,10 @@
#include "flexmember.h"
#include "time-internal.h"
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
#if !HAVE_TZSET
static void tzset (void... | CWE-119 | null | null |
5,988 | gmt_offset (time_t s)
{
long gmtoff;
#if !HAVE_TM_GMTOFF
struct tm tm_local = *localtime (&s);
struct tm tm_gmt = *gmtime (&s);
gmtoff = tm_diff (&tm_local, &tm_gmt);
#else
gmtoff = localtime (&s)->tm_gmtoff;
#endif
return gmtoff;
}
| Overflow | 0 | gmt_offset (time_t s)
{
long gmtoff;
#if !HAVE_TM_GMTOFF
struct tm tm_local = *localtime (&s);
struct tm tm_gmt = *gmtime (&s);
gmtoff = tm_diff (&tm_local, &tm_gmt);
#else
gmtoff = localtime (&s)->tm_gmtoff;
#endif
return gmtoff;
}
| @@ -432,5 +432,21 @@ main (int argc _GL_UNUSED, char **argv)
ASSERT ( parse_datetime (&result, "TZ=\"\\\\\"", &now));
ASSERT ( parse_datetime (&result, "TZ=\"\\\"\"", &now));
+ /* Outlandishly-long time zone abbreviations should not cause problems. */
+ {
+ static char const bufprefix[] = "TZ=\"";
+ ... | CWE-119 | null | null |
5,989 | static inline int finish_nested_data(UNSERIALIZE_PARAMETER)
{
if (*((*p)++) == '}')
| Exec Code | 0 | static inline int finish_nested_data(UNSERIALIZE_PARAMETER)
{
if (*((*p)++) == '}')
| @@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 */
+/* Generated by re2c 0.13.7.5 on Thu Dec 11 19:26:19 2014 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+
@@ -343,6 +343,9 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashT... | null | null | null |
5,990 | static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
{
long datalen;
datalen = parse_iv2((*p) + 2, p);
(*p) += 2;
if (datalen < 0 || (max - (*p)) <= datalen) {
zend_error(E_WARNING, "Insufficient data for unserializing - %ld required, %ld present", datalen, (long)(max - (*p)));
return... | Exec Code | 0 | static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce)
{
long datalen;
datalen = parse_iv2((*p) + 2, p);
(*p) += 2;
if (datalen < 0 || (max - (*p)) <= datalen) {
zend_error(E_WARNING, "Insufficient data for unserializing - %ld required, %ld present", datalen, (long)(max - (*p)));
return... | @@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 */
+/* Generated by re2c 0.13.7.5 on Thu Dec 11 19:26:19 2014 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+
@@ -343,6 +343,9 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashT... | null | null | null |
5,991 | static inline long parse_iv2(const unsigned char *p, const unsigned char **q)
{
char cursor;
long result = 0;
int neg = 0;
switch (*p) {
case '-':
neg++;
/* fall-through */
case '+':
p++;
}
while (1) {
cursor = (char)*p;
if (cursor >= '0' && cursor <= '9') {
result = result * 10 + (size_t)(... | Exec Code | 0 | static inline long parse_iv2(const unsigned char *p, const unsigned char **q)
{
char cursor;
long result = 0;
int neg = 0;
switch (*p) {
case '-':
neg++;
/* fall-through */
case '+':
p++;
}
while (1) {
cursor = (char)*p;
if (cursor >= '0' && cursor <= '9') {
result = result * 10 + (size_t)(... | @@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 */
+/* Generated by re2c 0.13.7.5 on Thu Dec 11 19:26:19 2014 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+
@@ -343,6 +343,9 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashT... | null | null | null |
5,992 | static inline size_t parse_uiv(const unsigned char *p)
{
unsigned char cursor;
size_t result = 0;
if (*p == '+') {
p++;
}
while (1) {
cursor = *p;
if (cursor >= '0' && cursor <= '9') {
result = result * 10 + (size_t)(cursor - (unsigned char)'0');
} else {
break;
}
p++;
}
return result;
}
| Exec Code | 0 | static inline size_t parse_uiv(const unsigned char *p)
{
unsigned char cursor;
size_t result = 0;
if (*p == '+') {
p++;
}
while (1) {
cursor = *p;
if (cursor >= '0' && cursor <= '9') {
result = result * 10 + (size_t)(cursor - (unsigned char)'0');
} else {
break;
}
p++;
}
return result;
}
| @@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 */
+/* Generated by re2c 0.13.7.5 on Thu Dec 11 19:26:19 2014 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+
@@ -343,6 +343,9 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashT... | null | null | null |
5,993 | static char *unserialize_str(const unsigned char **p, size_t *len, size_t maxlen)
{
size_t i, j;
char *str = safe_emalloc(*len, 1, 1);
unsigned char *end = *(unsigned char **)p+maxlen;
if (end < *p) {
efree(str);
return NULL;
}
for (i = 0; i < *len; i++) {
if (*p >= end) {
efree(str);
return NULL;
... | Exec Code | 0 | static char *unserialize_str(const unsigned char **p, size_t *len, size_t maxlen)
{
size_t i, j;
char *str = safe_emalloc(*len, 1, 1);
unsigned char *end = *(unsigned char **)p+maxlen;
if (end < *p) {
efree(str);
return NULL;
}
for (i = 0; i < *len; i++) {
if (*p >= end) {
efree(str);
return NULL;
... | @@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 */
+/* Generated by re2c 0.13.7.5 on Thu Dec 11 19:26:19 2014 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+
@@ -343,6 +343,9 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashT... | null | null | null |
5,994 | PHPAPI void var_destroy(php_unserialize_data_t *var_hashx)
{
void *next;
long i;
var_entries *var_hash = (*var_hashx)->first;
#if VAR_ENTRIES_DBG
fprintf(stderr, "var_destroy(%ld)\n", var_hash?var_hash->used_slots:-1L);
#endif
while (var_hash) {
next = var_hash->next;
efree(var_hash);
var_hash = next;
}
... | Exec Code | 0 | PHPAPI void var_destroy(php_unserialize_data_t *var_hashx)
{
void *next;
long i;
var_entries *var_hash = (*var_hashx)->first;
#if VAR_ENTRIES_DBG
fprintf(stderr, "var_destroy(%ld)\n", var_hash?var_hash->used_slots:-1L);
#endif
while (var_hash) {
next = var_hash->next;
efree(var_hash);
var_hash = next;
}
... | @@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 */
+/* Generated by re2c 0.13.7.5 on Thu Dec 11 19:26:19 2014 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+
@@ -343,6 +343,9 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashT... | null | null | null |
5,995 | static inline void var_push(php_unserialize_data_t *var_hashx, zval **rval)
{
var_entries *var_hash = (*var_hashx)->last;
#if VAR_ENTRIES_DBG
fprintf(stderr, "var_push(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval));
#endif
if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) {
var_hash = em... | Exec Code | 0 | static inline void var_push(php_unserialize_data_t *var_hashx, zval **rval)
{
var_entries *var_hash = (*var_hashx)->last;
#if VAR_ENTRIES_DBG
fprintf(stderr, "var_push(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval));
#endif
if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) {
var_hash = em... | @@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 */
+/* Generated by re2c 0.13.7.5 on Thu Dec 11 19:26:19 2014 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+
@@ -343,6 +343,9 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashT... | null | null | null |
5,996 | PHPAPI void var_push_dtor_no_addref(php_unserialize_data_t *var_hashx, zval **rval)
{
var_entries *var_hash = (*var_hashx)->last_dtor;
#if VAR_ENTRIES_DBG
fprintf(stderr, "var_push_dtor_no_addref(%ld): %d (%d)\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval), Z_REFCOUNT_PP(rval));
#endif
if (!var_hash || var_... | Exec Code | 0 | PHPAPI void var_push_dtor_no_addref(php_unserialize_data_t *var_hashx, zval **rval)
{
var_entries *var_hash = (*var_hashx)->last_dtor;
#if VAR_ENTRIES_DBG
fprintf(stderr, "var_push_dtor_no_addref(%ld): %d (%d)\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval), Z_REFCOUNT_PP(rval));
#endif
if (!var_hash || var_... | @@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 */
+/* Generated by re2c 0.13.7.5 on Thu Dec 11 19:26:19 2014 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+
@@ -343,6 +343,9 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashT... | null | null | null |
5,997 | PHPAPI void var_replace(php_unserialize_data_t *var_hashx, zval *ozval, zval **nzval)
{
long i;
var_entries *var_hash = (*var_hashx)->first;
#if VAR_ENTRIES_DBG
fprintf(stderr, "var_replace(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(nzval));
#endif
while (var_hash) {
for (i = 0; i < var_hash->use... | Exec Code | 0 | PHPAPI void var_replace(php_unserialize_data_t *var_hashx, zval *ozval, zval **nzval)
{
long i;
var_entries *var_hash = (*var_hashx)->first;
#if VAR_ENTRIES_DBG
fprintf(stderr, "var_replace(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(nzval));
#endif
while (var_hash) {
for (i = 0; i < var_hash->use... | @@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 */
+/* Generated by re2c 0.13.7.5 on Thu Dec 11 19:26:19 2014 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+
@@ -343,6 +343,9 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashT... | null | null | null |
5,998 | static bool blit_region_is_unsafe(struct CirrusVGAState *s,
int32_t pitch, int32_t addr)
{
if (pitch < 0) {
int64_t min = addr
+ ((int64_t)s->cirrus_blt_height-1) * pitch;
int32_t max = addr
+ s->cirrus_blt_width;
if (min < 0 || max >... | Exec Code Overflow | 0 | static bool blit_region_is_unsafe(struct CirrusVGAState *s,
int32_t pitch, int32_t addr)
{
if (pitch < 0) {
int64_t min = addr
+ ((int64_t)s->cirrus_blt_height-1) * pitch;
int32_t max = addr
+ s->cirrus_blt_width;
if (min < 0 || max >... | @@ -293,6 +293,10 @@ static bool blit_is_unsafe(struct CirrusVGAState *s)
assert(s->cirrus_blt_width > 0);
assert(s->cirrus_blt_height > 0);
+ if (s->cirrus_blt_width > CIRRUS_BLTBUFSIZE) {
+ return true;
+ }
+
if (blit_region_is_unsafe(s, s->cirrus_blt_dstpitch,
... | CWE-119 | null | null |
5,999 | static int cirrus_bitblt_common_patterncopy(CirrusVGAState * s,
const uint8_t * src)
{
uint8_t *dst;
dst = s->vga.vram_ptr + (s->cirrus_blt_dstaddr & s->cirrus_addr_mask);
if (blit_is_unsafe(s))
return 0;
(*s->cirrus_rop) (s, dst, src,
s->cirrus_blt_dstpitch, 0,... | Exec Code Overflow | 0 | static int cirrus_bitblt_common_patterncopy(CirrusVGAState * s,
const uint8_t * src)
{
uint8_t *dst;
dst = s->vga.vram_ptr + (s->cirrus_blt_dstaddr & s->cirrus_addr_mask);
if (blit_is_unsafe(s))
return 0;
(*s->cirrus_rop) (s, dst, src,
s->cirrus_blt_dstpitch, 0,... | @@ -293,6 +293,10 @@ static bool blit_is_unsafe(struct CirrusVGAState *s)
assert(s->cirrus_blt_width > 0);
assert(s->cirrus_blt_height > 0);
+ if (s->cirrus_blt_width > CIRRUS_BLTBUFSIZE) {
+ return true;
+ }
+
if (blit_region_is_unsafe(s, s->cirrus_blt_dstpitch,
... | CWE-119 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.