func_before stringlengths 10 482k | func_after stringlengths 14 484k | cve_id stringlengths 13 28 ⌀ | cwe_id stringclasses 776
values | cve_description stringlengths 30 3.31k ⌀ | commit_link stringlengths 48 164 ⌀ | commit_message stringlengths 1 30.3k ⌀ | file_name stringlengths 4 244 ⌀ | extension stringclasses 20
values | datetime stringdate 1999-11-10 02:42:49 2024-01-29 16:00:57 ⌀ |
|---|---|---|---|---|---|---|---|---|---|
public void test_like_startsWith() {
Entity from = from(Entity.class);
where(from.getCode()).like().startsWith("test");
Query<Entity> select = select(from);
assertEquals("select entity_0 from Entity entity_0 where entity_0.code like 'test%'", select.getQuery());
} | public void test_like_startsWith() {
Entity from = from(Entity.class);
where(from.getCode()).like().startsWith("test");
Query<Entity> select = select(from);
assertEquals("select entity_0 from Entity entity_0 where entity_0.code like :code_1", select.getQuery());
assertEquals("test%", select.getParameters().g... | CVE-2019-11343 | NVD-CWE-noinfo | Torpedo Query before 2.5.3 mishandles the LIKE operator in ConditionBuilder.java, LikeCondition.java, and NotLikeCondition.java. | https://github.com/xjodoin/torpedoquery/commit/3c20b874fba9cc2a78b9ace10208de1602b56c3f | Fix issue with like | ConditionBuilder.java | java | 2020-03-12T21:15:00Z |
@Nullable
public String getSourceSpawnerName(){
String spawnerName = this.sourceSpawnerName;
if (this.sourceSpawnerName == null){
synchronized (livingEntity.getPersistentDataContainer()){
if (getPDC().has(main.namespaced_keys.sourceSpawnerName, PersistentDataType.STRING)... | @Nullable
public String getSourceSpawnerName(){
if (this.sourceSpawnerName != null) return this.sourceSpawnerName;
if (getPDCLock()) {
try {
if (getPDC().has(main.namespaced_keys.sourceSpawnerName, PersistentDataType.STRING))
this.sourceSpawnerName = ... | null | null | null | https://github.com/ArcanePlugins/LevelledMobs/commit/b6f820e0e861b368623996b006c6b6300b6eadc0 | 3.3.0 b574
* when using any of the new variables `%home_distance%`, `%home_distance_with_bed%`, `%bed_distance%` and the player is in nether, if no bed or home location is present then the portal they entered the nether from is utilised
* improved locking code to prevent potential server crashes / hangs
* added LM 3.2... | src/main/java/me/lokka30/levelledmobs/misc/LivingEntityWrapper.java | java | 2021-11-29T15:53:33Z |
int WavpackSetConfiguration64 (WavpackContext *wpc, WavpackConfig *config, int64_t total_samples, const unsigned char *chan_ids)
{
uint32_t flags, bps = 0;
uint32_t chan_mask = config->channel_mask;
int num_chans = config->num_channels;
int i;
wpc->stream_version = (config->flags & CONFIG_COMPA... | int WavpackSetConfiguration64 (WavpackContext *wpc, WavpackConfig *config, int64_t total_samples, const unsigned char *chan_ids)
{
uint32_t flags, bps = 0;
uint32_t chan_mask = config->channel_mask;
int num_chans = config->num_channels;
int i;
if (!config->sample_rate) {
strcpy (wpc->err... | CVE-2018-19840 | CWE-835 | The function WavpackPackInit in pack_utils.c in libwavpack.a in WavPack through 5.1.0 allows attackers to cause a denial-of-service (resource exhaustion caused by an infinite loop) via a crafted wav audio file because WavpackSetConfiguration64 mishandles a sample rate of zero. | https://github.com/dbry/WavPack/commit/070ef6f138956d9ea9612e69586152339dbefe51 | issue #53: error out on zero sample rate | src/pack_utils.c | c | 2018-11-30T05:00:42Z |
isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg)
{
unsigned long val;
int r, i, j;
struct ippp_struct *is;
isdn_net_local *lp;
struct isdn_ppp_comp_data data;
void __user *argp = (void __user *)arg;
is = file->private_data;
lp = is->lp;
if (is->debug & 0x1)
printk(KERN_DEBUG ... | isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg)
{
unsigned long val;
int r, i, j;
struct ippp_struct *is;
isdn_net_local *lp;
struct isdn_ppp_comp_data data;
void __user *argp = (void __user *)arg;
is = file->private_data;
lp = is->lp;
if (is->debug & 0x1)
printk(KERN_DEBUG ... | CVE-2015-7799 | null | The slhc_init function in drivers/net/slip/slhc.c in the Linux kernel through 4.2.3 does not ensure that certain slot numbers are valid, which allows local users to cause a denial of service (NULL pointer dereference and system crash) via a crafted PPPIOCSMAXCID ioctl call. | http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/net/slip/slhc.c?id=4ab42d78e37a294ac7bc56901d563c642e03c4ae | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... | null | null | null |
public void trimChangedTagNamesValues() {
Entity entity = getEntity();
if (entity == null) {
return;
}
Set<String> changedTags = new HashSet<>(entity.getChangedTags());
if (!Algorithms.isEmpty(changedTags)) {
for (String changedTag : changedTags) {
if (changedTag == null || changedTag.trim().equals(... | public void trimChangedTagNamesValues() {
Entity entity = getEntity();
if (entity == null || entity.getChangedTags() == null) {
return;
}
Set<String> changedTags = new HashSet<>(entity.getChangedTags());
if (!Algorithms.isEmpty(changedTags)) {
for (String changedTag : changedTags) {
if (changedTag =... | null | null | null | https://github.com/osmandapp/OsmAnd/commit/31ad764da69284c64be01b06290a56af99d23dd1 | Fix #15245 CRASH on upload new POI | OsmAnd/src/net/osmand/plus/plugins/osmedit/data/OpenstreetmapPoint.java | java | 2022-09-19T17:32:38Z |
@Override
public int suggestedInternalSecurityLevel() {
// invoked after nextTurn() processing is complete on each civ's turn
// also invoked when contact is made in mid-turn
// return from 0 to 40, which translates to 0% to 20% of total prod
//
// modnar: is it not 0% to 10%... | @Override
public int suggestedInternalSecurityLevel() {
// invoked after nextTurn() processing is complete on each civ's turn
// also invoked when contact is made in mid-turn
// return from 0 to 40, which translates to 0% to 20% of total prod
//
// modnar: is it not 0% to 10%... | null | null | null | https://github.com/rayfowler/rotp-public/commit/e4239ef2d2162d2bc31a5bb2a6aa9134034aa7e6 | Xilmi ai (#45)
* Replaced many isPlayer() by isPlayerControlled()
This leads to a more fluent experience on AutoPlay.
Note: the council-voting acts weird when you try that there, getting you stuck, and the News-Broadcasts also seem to use a differnt logic and are always shown.
* Orion-guard-handling
Avoid sending c... | src/rotp/model/ai/xilmi/AISpyMaster.java | java | 2021-03-26T15:26:00Z |
public static int canRestrictMember (TdApi.ChatMemberStatus me, TdApi.ChatMemberStatus him) {
if (him.getConstructor() == TdApi.ChatMemberStatusCreator.CONSTRUCTOR) {
return RESTRICT_MODE_NONE;
}
switch (me.getConstructor()) {
case TdApi.ChatMemberStatusCreator.CONSTRUCTOR:
switch (him.g... | public static int canRestrictMember (TdApi.ChatMemberStatus me, TdApi.ChatMemberStatus him) {
if (him.getConstructor() == TdApi.ChatMemberStatusCreator.CONSTRUCTOR) {
return RESTRICT_MODE_NONE;
}
switch (me.getConstructor()) {
case TdApi.ChatMemberStatusCreator.CONSTRUCTOR:
switch (him.g... | null | null | null | https://github.com/TGX-Android/Telegram-X/commit/4ac723c4100ee888b9e0f01ddcf44a259d81d73c | fixed crash when deleting messages from different senders in supergroups + added managing admin rights in message menu + improved banning/unbanning chats + fixed unavailable save button when changing only blocked date + fixed screenshot availability for chat preview + other bugfixes | app/src/main/java/org/thunderdog/challegram/data/TD.java | java | 2021-12-12T01:41:10Z |
QPDF::resolveObjectsInStream(int obj_stream_number)
{
// Force resolution of object stream
QPDFObjectHandle obj_stream = getObjectByID(obj_stream_number, 0);
if (! obj_stream.isStream())
{
throw QPDFExc(qpdf_e_damaged_pdf, this->m->file->getName(),
this->m->last_object_description,
this... | QPDF::resolveObjectsInStream(int obj_stream_number)
{
// Force resolution of object stream
QPDFObjectHandle obj_stream = getObjectByID(obj_stream_number, 0);
if (! obj_stream.isStream())
{
throw QPDFExc(qpdf_e_damaged_pdf, this->m->file->getName(),
this->m->last_object_description,
this... | null | CWE-787 | null | https://github.com/qpdf/qpdf/commit/d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... | null | null | 2019-06-21T03:35:23Z |
static DataSource lookupDataSource(Hints hints) throws FactoryException {
Object hint = hints.get(Hints.EPSG_DATA_SOURCE);
if (hint instanceof DataSource) {
return (DataSource) hint;
} else if (hint instanceof String) {
String name = (String) hint;
InitialCont... | static DataSource lookupDataSource(Hints hints) throws FactoryException {
Object hint = hints.get(Hints.EPSG_DATA_SOURCE);
if (hint instanceof DataSource) {
return (DataSource) hint;
} else if (hint instanceof String) {
String name = (String) hint;
try {
... | CVE-2022-24818 | CWE-917,CWE-20 | GeoTools is an open source Java library that provides tools for geospatial data. The GeoTools library has a number of data sources that can perform unchecked JNDI lookups, which in turn can be used to perform class deserialization and result in arbitrary code execution. Similar to the Log4J case, the vulnerability can ... | https://github.com/geotools/geotools/commit/4f70fa3234391dd0cda883a20ab0ec75688cba49 | [GEOT-7115] Streamline JNDI lookups | AbstractEpsgMediator.java | java | 2022-04-13T21:15:00Z |
vips_foreign_load_gif_scan_image( VipsForeignLoadGif *gif )
{
VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( gif );
GifFileType *file = gif->file;
ColorMapObject *map = file->Image.ColorMap ?
file->Image.ColorMap : file->SColorMap;
GifByteType *extension;
if( DGifGetImageDesc( gif->file ) == GIF_ERROR... | vips_foreign_load_gif_scan_image( VipsForeignLoadGif *gif )
{
VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( gif );
GifFileType *file = gif->file;
ColorMapObject *map;
GifByteType *extension;
if( DGifGetImageDesc( gif->file ) == GIF_ERROR ) {
vips_foreign_load_gif_error( gif );
return( -1 );
}
/... | CVE-2019-17534 | CWE-416 | vips_foreign_load_gif_scan_image in foreign/gifload.c in libvips before 8.8.2 tries to access a color map before a DGifGetImageDesc call, leading to a use-after-free. | https://github.com/libvips/libvips/commit/ce684dd008532ea0bf9d4a1d89bacb35f4a83f4d | fetch map after DGifGetImageDesc()
Earlier refactoring broke GIF map fetch. | gifload.c | c | 2019-08-27T11:50:52Z |
I18NCustomBindings::I18NCustomBindings(ScriptContext* context)
: ObjectBackedNativeHandler(context) {
RouteFunction(
"GetL10nMessage",
base::Bind(&I18NCustomBindings::GetL10nMessage, base::Unretained(this)));
RouteFunction("GetL10nUILanguage",
base::Bind(&I18NCustomBindings::GetL... | I18NCustomBindings::I18NCustomBindings(ScriptContext* context)
: ObjectBackedNativeHandler(context) {
RouteFunction(
"GetL10nMessage", "i18n",
base::Bind(&I18NCustomBindings::GetL10nMessage, base::Unretained(this)));
RouteFunction("GetL10nUILanguage", "i18n",
base::Bind(&I18NCust... | CVE-2016-1696 | CWE-254,CWE-284 | The extensions subsystem in Google Chrome before 51.0.2704.79 does not properly restrict bindings access, which allows remote attackers to bypass the Same Origin Policy via unspecified vectors. | https://github.com/chromium/chromium/commit/c0569cc04741cccf6548c2169fcc1609d958523f | [Extensions] Expand bindings access checks
BUG=601149
BUG=601073
Review URL: https://codereview.chromium.org/1866103002
Cr-Commit-Position: refs/heads/master@{#387710} | extensions/renderer/i18n_custom_bindings.cc | cc | 2016-04-15T21:51:21Z |
uppdateCard(id, asked, answered) {
this.get(
`SELECT * FROM flashcards WHERE id="${id}"`,
(err, card) => {
if (!card || !card.id) throw 'could not update the card';
this.run(`REPLACE INTO flashcards VALUES(${card.id}, ${card.user}, "${card.text}", "${card.... | uppdateCard(id, asked, answered) {
this.get(
'SELECT * FROM flashcards WHERE id = ?',
[id],
(err, card) => {
if (!card || !card.id) throw 'could not update the card';
this.run(
'REPLACE INTO flashcards VALUES(?, ?, ?, ?, ?, ... | CVE-2019-15561 | CWE-89 | FlashLingo before 2019-06-12 allows SQL injection, related to flashlingo.js and db.js. | https://github.com/vpoliakov/FlashLingo/commit/42537d90087a920210048d6fe32c2d8c801790b9 | Fixes for sql injection and app rerendering | db.js | js | 2019-06-12T20:55:08Z |
int ipmi_destroy_user(struct ipmi_user *user)
{
_ipmi_destroy_user(user);
cleanup_srcu_struct(&user->release_barrier);
kref_put(&user->refcount, free_user);
return 0;
} | int ipmi_destroy_user(struct ipmi_user *user)
{
_ipmi_destroy_user(user);
kref_put(&user->refcount, free_user);
return 0;
} | null | CWE-416, CWE-284 | null | https://github.com/torvalds/linux/commit/77f8269606bf95fcb232ee86f6da80886f1dfae8 | ipmi: fix use-after-free of user->release_barrier.rda
When we do the following test, we got oops in ipmi_msghandler driver
while((1))
do
service ipmievd restart & service ipmievd restart
done
---------------------------------------------------------------
[ 294.230186] Unable to handle kernel paging request at virt... | null | null | 2019-01-16T05:33:22Z |
static void chomp3(ChannelData *ctx, int16_t *output, uint8_t val,
const uint16_t tab1[],
const int16_t *tab2, int tab2_stride,
uint32_t numChannels)
{
int16_t current;
current = tab2[((ctx->index & 0x7f0) >> 4)*tab2_stride + val];
current = mace_brok... | static void chomp3(ChannelData *ctx, int16_t *output, uint8_t val,
const uint16_t tab1[],
const int16_t *tab2, int tab2_stride,
uint32_t numChannels)
{
int16_t current;
if (val < tab2_stride)
current = tab2[((ctx->index & 0x7f0) >> 4)*tab2_stride ... | null | null | null | FFmpeg/commit/f36aec3b5e18c4c167612d0051a6d5b6144b3552 | Exploit symmetry to reduce size of tables by half.
Originally committed as revision 15255 to svn://svn.ffmpeg.org/ffmpeg/trunk | ./ffmpeg/libavcodec/mace.c | c | 2008-09-07T17:20:55Z |
def _clean_code(self, code: str) -> str:
"""
A method to clean the code to prevent malicious code execution
Args:
code(str): A python code
Returns (str): Returns a Clean Code String
"""
tree = ast.parse(code)
new_body = []
# clear recent ... | def _clean_code(self, code: str) -> str:
"""
A method to clean the code to prevent malicious code execution
Args:
code(str): A python code
Returns (str): Returns a Clean Code String
"""
tree = ast.parse(code)
new_body = []
# clear recent ... | null | null | null | https://github.com/gventuri/pandas-ai/commit/3aac79be8fc1d18b53d66a566adddbbdd2b38ad5 | fix: bypass the security check with prompt injection (#399) (#409) | pandasai/__init__.py | py | 2023-07-28T23:29:40Z |
void Messageheader::Parser::checkHeaderspace(unsigned chars) const
{
if (headerdataPtr + chars >= header.rawdata + sizeof(header.rawdata))
throw HttpError(HTTP_REQUEST_ENTITY_TOO_LARGE, "header too large");
} | void Messageheader::Parser::checkHeaderspace(unsigned chars) const
{
if (headerdataPtr + chars >= header.rawdata + sizeof(header.rawdata))
{
header.rawdata[sizeof(header.rawdata) - 1] = '\0';
throw HttpError(HTTP_REQUEST_ENTITY_TOO_LARGE, "header too large");
}
} | CVE-2013-7299 | CWE-200 | framework/common/messageheaderparser.cpp in Tntnet before 2.2.1 allows remote attackers to obtain sensitive information via a header that ends in \n instead of \r\n, which prevents a null terminator from being added and causes Tntnet to include headers from other requests. | https://github.com/maekitalo/tntnet/commit/9bd3b14042e12d84f39ea9f55731705ba516f525 | fix possible information leak | null | null | 2013-12-11T13:59:32Z |
public static String loadTextFile(BufferedReader iStream) throws IOException {
StringWriter buffer = null;
PrintWriter writer = null;
try {
buffer = new StringWriter();
writer = new PrintWriter(buffer);
String line = null;
while ((line = iStream.readLine()) != null)
writer.pr... | public static String loadTextFile(BufferedReader iStream) throws IOException {
try (StringWriter buffer = new StringWriter(); PrintWriter writer = new PrintWriter(buffer);) {
String line = null;
while ((line = iStream.readLine()) != null) {
writer.println(line);
}
return buffer.toStr... | null | null | null | https://github.com/apache/uima-uimaj/commit/aeb44042110b2e5876437126d496633fff1cc091 | Merge pull request #145 from apache/bugfix/UIMA-6387-Update-p2-repo-URLs-from-http-to-https
[UIMA-6387] Update p2 repo URLs from http to https | uimaj-core/src/main/java/org/apache/uima/pear/util/FileUtil.java | java | 2023-01-24T07:25:16Z |
static unsigned int XBMInteger(Image *image,short int *hex_digits)
{
int
c;
unsigned int
value;
/*
Skip any leading whitespace.
*/
do
{
c=ReadBlobByte(image);
if (c == EOF)
return(0);
} while ((c == ' ') || (c == '\t') || (c == '\n') || (c == '\r'));
/*
Evaluate num... | static int XBMInteger(Image *image,short int *hex_digits)
{
int
c;
unsigned int
value;
/*
Skip any leading whitespace.
*/
do
{
c=ReadBlobByte(image);
if (c == EOF)
return(-1);
} while ((c == ' ') || (c == '\t') || (c == '\n') || (c == '\r'));
/*
Evaluate number.
*... | null | null | null | https://github.com/ImageMagick/ImageMagick/commit/b8c63b156bf26b52e710b1a0643c846a6cd01e56 | https://github.com/ImageMagick/ImageMagick/issues/712 | coders/xbm.c | c | 2017-08-31T13:10:37Z |
public function dump($value)
{
$dumper = $this->getDumper();
if ($dumper) {
// re-use the same DumpOutput instance, so it won't re-render the global styles/scripts on each dump.
// exclude verbose information (e.g. exception stack traces)
if (class_exists('Symfon... | public function dump($value)
{
$dumper = $this->getDumper();
if ($dumper) {
// re-use the same DumpOutput instance, so it won't re-render the global styles/scripts on each dump.
// exclude verbose information (e.g. exception stack traces)
if (class_exists('Symfon... | CVE-2017-16880 | CWE-79 | The dump function in Util/TemplateHelper.php in filp whoops before 2.1.13 has XSS. | https://github.com/filp/whoops/commit/c16791d28d1ca3139e398145f0c6565c523c291a | TemplateHelper: fix XSS if Symfony dumper is not available | TemplateHelper.php | php | 2017-11-17T21:29:00Z |
static int vvfat_open(BlockDriverState *bs, QDict *options, int flags)
{
BDRVVVFATState *s = bs->opaque;
int cyls, heads, secs;
bool floppy;
const char *dirname;
QemuOpts *opts;
Error *local_err = NULL;
int ret;
#ifdef DEBUG
vvv = s;
#endif
DLOG(if (stderr == NULL) {
stderr = fopen("... | static int vvfat_open(BlockDriverState *bs, QDict *options, int flags)
{
BDRVVVFATState *s = bs->opaque;
int cyls, heads, secs;
bool floppy;
const char *dirname;
QemuOpts *opts;
Error *local_err = NULL;
int ret;
#ifdef DEBUG
vvv = s;
#endif
DLOG(if (stderr == NULL) {
stderr = fopen("... | null | null | null | qemu/commit/78f27bd02ceba4a2f6ac5c725f4d4410eec205ef | block: fix vvfat error path for enable_write_target
s->qcow and s->qcow_filename are allocated but not freed on error. Fix the
possible leaks, remove unnecessary check for bdrv_new(), propagate ret code of
bdrv_create() and also the one of enable_write_target().
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by:... | ./qemu/block/vvfat.c | c | 2013-07-17T09:57:37Z |
static void php_wddx_push_element(void *user_data, const XML_Char *name, const XML_Char **atts)
{
st_entry ent;
wddx_stack *stack = (wddx_stack *)user_data;
if (!strcmp(name, EL_PACKET)) {
int i;
if (atts) for (i=0; atts[i]; i++) {
if (!strcmp(atts[i], EL_VERSION)) {
/* nothing for now */
}
}
} el... | static void php_wddx_push_element(void *user_data, const XML_Char *name, const XML_Char **atts)
{
st_entry ent;
wddx_stack *stack = (wddx_stack *)user_data;
if (!strcmp(name, EL_PACKET)) {
int i;
if (atts) for (i=0; atts[i]; i++) {
if (!strcmp(atts[i], EL_VERSION)) {
/* nothing for now */
}
}
} el... | CVE-2017-11143 | CWE-502 | In PHP before 5.6.31, an invalid free in the WDDX deserialization of boolean parameters could be used by attackers able to inject XML for deserialization to crash the PHP interpreter, related to an invalid free for an empty boolean element in ext/wddx/wddx.c. | https://git.php.net/?p=php-src.git;a=commit;h=2aae60461c2ff7b7fbcdd194c789ac841d0747d7 | null | null | null | null |
bool IsIdentityConsumingSwitch(const MutableGraphView& graph,
const NodeDef& node) {
if ((IsIdentity(node) || IsIdentityNSingleInput(node)) &&
node.input_size() > 0) {
TensorId tensor_id = ParseTensorName(node.input(0));
if (IsTensorIdControlling(tensor_id)) {
return... | bool IsIdentityConsumingSwitch(const MutableGraphView& graph,
const NodeDef& node) {
if ((IsIdentity(node) || IsIdentityNSingleInput(node)) &&
node.input_size() > 0) {
TensorId tensor_id = ParseTensorName(node.input(0));
if (IsTensorIdControlling(tensor_id)) {
return... | CVE-2022-23589 | CWE-476 | Tensorflow is an Open Source Machine Learning Framework. Under certain scenarios, Grappler component of TensorFlow can trigger a null pointer dereference. There are 2 places where this can occur, for the same malicious alteration of a `SavedModel` file (fixing the first one would trigger the same dereference in the sec... | https://github.com/tensorflow/tensorflow/commit/045deec1cbdebb27d817008ad5df94d96a08b1bf | Prevent null pointer dereference in `mutable_graph_view`
PiperOrigin-RevId: 409684472
Change-Id: I577eb9d9ac470fcec0501423171e739a4ec0cb5c | mutable_graph_view.cc | cc | 2021-11-13T18:12:22Z |
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TF_LITE_ENSURE_EQ(context, NumInputs(node), 2);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTensor* input = GetInput(context, node, kInputTensor);
TfLiteTensor* output = GetOutput(context, node, kOutputTensor);
TF_LITE_ENSURE_... | TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TF_LITE_ENSURE_EQ(context, NumInputs(node), 2);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTensor* input;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensor, &input));
TfLiteTensor* output;
TF_LITE_ENSURE_O... | CVE-2020-15211 | CWE-125,CWE-787 | In TensorFlow Lite before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1, saved models in the flatbuffer format use a double indexing scheme: a model has a set of subgraphs, each subgraph has a set of operators and each operator has a set of input/output tensors. The flatbuffer format uses indices for the tensors, inde... | https://github.com/tensorflow/tensorflow/commit/1970c2158b1ffa416d159d03c3370b9a462aee35 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... | add_n.cc | cc | 2020-09-25T19:15:00Z |
@Method(0x800ebb44L)
public static void FUN_800ebb44() {
final WMapStruct258 struct = struct258_800c66a8;
_800c86fc.setu(0x1L);
struct._24 = new WMapStruct258Sub60[24];
//LAB_800ebbb4
final VECTOR sp0x20 = new VECTOR();
for(int i = 0; i < 12; i++) {
final WMapStruct258Sub60 sp18 = new ... | @Method(0x800ebb44L)
public static void FUN_800ebb44() {
final WMapStruct258 struct = struct258_800c66a8;
_800c86fc.setu(0x1L);
struct._24 = new WMapStruct258Sub60[24];
//LAB_800ebbb4
final VECTOR sp0x20 = new VECTOR();
for(int i = 0; i < 12; i++) {
final WMapStruct258Sub60 sp18 = new ... | null | null | null | https://github.com/Legend-of-Dragoon-Modding/Severed-Chains/commit/54e5a8cf898d43d53da9bcabdd49130a48a9e738 | Fix crash on wmap | src/main/java/legend/game/WMap.java | java | 2023-01-25T23:06:21Z |
static int map_freeze(const union bpf_attr *attr)
{
int err = 0, ufd = attr->map_fd;
struct bpf_map *map;
struct fd f;
if (CHECK_ATTR(BPF_MAP_FREEZE))
return -EINVAL;
f = fdget(ufd);
map = __bpf_map_get(f);
if (IS_ERR(map))
return PTR_ERR(map);
if (map->map_type == BPF_MAP_TYPE_STRUCT_OPS ||
map_val... | static int map_freeze(const union bpf_attr *attr)
{
int err = 0, ufd = attr->map_fd;
struct bpf_map *map;
struct fd f;
if (CHECK_ATTR(BPF_MAP_FREEZE))
return -EINVAL;
f = fdget(ufd);
map = __bpf_map_get(f);
if (IS_ERR(map))
return PTR_ERR(map);
if (map->map_type == BPF_MAP_TYPE_STRUCT_OPS ||
map_val... | CVE-2021-4001 | CWE-367 | A race condition was found in the Linux kernel's ebpf verifier between bpf_map_update_elem and bpf_map_freeze due to a missing lock in kernel/bpf/syscall.c. In this flaw, a local user with a special privilege (cap_sys_admin or cap_bpf) can modify the frozen mapped address space. This flaw affects kernel versions prior ... | https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=353050be4c19e102178ccc05988101887c25ae53 | bpf: Fix toctou on read-only map's constant scalar tracking
Commit a23740ec43ba ("bpf: Track contents of read-only maps as scalars") is
checking whether maps are read-only both from BPF program side and user space
side, and then, given their content is constant, reading out their data via
map->ops->map_direct_value_ad... | null | null | null |
static struct prog_entry *
predicate_parse(const char *str, int nr_parens, int nr_preds,
parse_pred_fn parse_pred, void *data,
struct filter_parse_error *pe)
{
struct prog_entry *prog_stack;
struct prog_entry *prog;
const char *ptr = str;
char *inverts = NULL;
int *op_stack;
int *top;
int invert = 0;
int re... | static struct prog_entry *
predicate_parse(const char *str, int nr_parens, int nr_preds,
parse_pred_fn parse_pred, void *data,
struct filter_parse_error *pe)
{
struct prog_entry *prog_stack;
struct prog_entry *prog;
const char *ptr = str;
char *inverts = NULL;
int *op_stack;
int *top;
int invert = 0;
int re... | null | null | null | https://github.com/torvalds/linux/commit/81f9c4e4177d31ced6f52a89bb70e93bfb77ca03 | Merge tag 'trace-v4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fixes from Steven Rostedt:
"This contains a few fixes and a clean up.
- a bad merge caused an "endif" to go in the wrong place in
scripts/Makefile.build
- softirq tracing fix for tracing that cor... | kernel/trace/trace_events_filter.c | c | 2018-06-23T22:23:28Z |
jas_image_t *jp2_decode(jas_stream_t *in, const char *optstr)
{
jp2_box_t *box;
int found;
jas_image_t *image;
jp2_dec_t *dec;
bool samedtype;
int dtype;
unsigned int i;
jp2_cmap_t *cmapd;
jp2_pclr_t *pclrd;
jp2_cdef_t *cdefd;
unsigned int channo;
int newcmptno;
int_fast32_t *lutents;
#if 0
jp2_cdefchan_t... | jas_image_t *jp2_decode(jas_stream_t *in, const char *optstr)
{
jp2_box_t *box;
int found;
jas_image_t *image;
jp2_dec_t *dec;
bool samedtype;
int dtype;
unsigned int i;
jp2_cmap_t *cmapd;
jp2_pclr_t *pclrd;
jp2_cdef_t *cdefd;
unsigned int channo;
int newcmptno;
int_fast32_t *lutents;
#if 0
jp2_cdefchan_t... | CVE-2021-3443 | CWE-476 | A NULL pointer dereference flaw was found in the way Jasper versions before 2.0.27 handled component references in the JP2 image format decoder. A specially crafted JP2 image file could cause an application using the Jasper library to crash when opened. | https://github.com/jasper-software/jasper/commit/f94e7499a8b1471a4905c4f9c9e12e60fe88264b | Fixes #269.
Added a check for an invalid component reference in the JP2 decoder.
Added a related test case for the JP2 codec. | null | null | 2021-03-14T04:04:58Z |
static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
{
struct ipv6_txoptions opt_space;
DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name);
struct in6_addr *daddr, *final_p, final;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct raw6_sock *rp = raw... | static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
{
struct ipv6_txoptions *opt_to_free = NULL;
struct ipv6_txoptions opt_space;
DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name);
struct in6_addr *daddr, *final_p, final;
struct inet_sock *inet = inet_sk(sk);
struct ipv6_pinfo *np... | null | CWE-416, CWE-284, CWE-264 | null | https://github.com/torvalds/linux/commit/45f6fad84cc305103b28d73482b344d7f5b76f39 | ipv6: add complete rcu protection around np->opt
This patch addresses multiple problems :
UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions
while socket is not locked : Other threads can change np->opt
concurrently. Dmitry posted a syzkaller
(http://github.com/google/syzkaller) program desmonstrating
use-a... | null | null | 2015-11-30T03:37:57Z |
static int frame_thread_init(AVCodecContext *avctx)
{
int thread_count = avctx->thread_count;
AVCodec *codec = avctx->codec;
AVCodecContext *src = avctx;
FrameThreadContext *fctx;
int i, err = 0;
if (thread_count <= 1) {
avctx->active_thread_type = 0;
return 0;
}
avctx->t... | static int frame_thread_init(AVCodecContext *avctx)
{
int thread_count = avctx->thread_count;
AVCodec *codec = avctx->codec;
AVCodecContext *src = avctx;
FrameThreadContext *fctx;
int i, err = 0;
if (thread_count <= 1) {
avctx->active_thread_type = 0;
return 0;
}
avctx->t... | null | null | null | FFmpeg/commit/2bb79b23fe106a45eab6ff80d7ef7519d542d1f7 | pthread: next try on freeing threads without crashing.
This should fix mingw
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> | ./ffmpeg/libavcodec/pthread.c | c | 2011-11-27T04:55:20Z |
static unsigned tget_long(const uint8_t **p, int le)
{
unsigned v = le ? AV_RL32(*p) : AV_RB32(*p);
*p += 4;
return v;
} | static unsigned tget_long(GetByteContext *gb, int le)
{
return le ? bytestream2_get_le32(gb) : bytestream2_get_be32(gb);
} | null | null | null | FFmpeg/commit/0a467a9b594dd67aa96bad687d05f8845b009f18 | tiffdec: use bytestream2 to simplify overread/overwrite protection
Based on a patch by Paul B Mahol <onemda@gmail.com>
CC:libav-stable@libav.org | ./ffmpeg/libavcodec/tiff.c | c | 2013-09-29T23:47:55Z |
@Override
public void load(CompoundTag compoundTag) {
super.load(compoundTag);
this.color = compoundTag.contains(COLOR_TAG) ? compoundTag.getInt(COLOR_TAG) : DEFAULT_COLOR;
if (compoundTag.contains(STATUS_EFFECT_TAG) && !compoundTag.getString(STATUS_EFFECT_TAG).trim().equals("")) {
... | @Override
public void load(CompoundTag compoundTag) {
super.load(compoundTag);
this.color = compoundTag.contains(COLOR_TAG) ? compoundTag.getInt(COLOR_TAG) : DEFAULT_COLOR;
if (compoundTag.contains(STATUS_EFFECT_TAG) && !compoundTag.getString(STATUS_EFFECT_TAG).trim().equals("")) {
... | null | null | null | https://github.com/TelepathicGrunt/Bumblezone/commit/920145e344a09483c3be9eb9c1d761394e03c119 | fixed incense candle server crash | src/main/java/com/telepathicgrunt/the_bumblezone/blocks/blockentities/IncenseCandleBlockEntity.java | java | 2022-12-03T15:50:15Z |
void CLASS foveon_dp_load_raw()
{
unsigned c, roff[4], row, col, diff;
ushort huff[512], vpred[2][2], hpred[2];
fseek (ifp, 8, SEEK_CUR);
foveon_huff (huff);
roff[0] = 48;
FORC3 roff[c+1] = -(-(roff[c] + get4()) & -16);
FORC3 {
fseek (ifp, data_offset+roff[c], SEEK_SET);
getbits(-1);
vpred[0]... | void CLASS foveon_dp_load_raw()
{
unsigned c, roff[4], row, col, diff;
ushort huff[1024], vpred[2][2], hpred[2];
fseek (ifp, 8, SEEK_CUR);
foveon_huff (huff);
roff[0] = 48;
FORC3 roff[c+1] = -(-(roff[c] + get4()) & -16);
FORC3 {
fseek (ifp, data_offset+roff[c], SEEK_SET);
getbits(-1);
vpred[0... | null | CWE-119, CWE-787, CWE-190 | null | https://github.com/LibRaw/LibRaw-demosaic-pack-GPL2/commit/194f592e205990ea8fce72b6c571c14350aca716 | Fixed possible foveon buffer overrun (Secunia SA750000) | null | null | 2017-03-04T16:55:24Z |
private void blockIdOrDataChanged() {
int blockType = comboBoxBlockType.getSelectedIndex();
int dataValue = (Integer) spinnerDataValue.getValue();
material = Material.get(blockType, dataValue);
namespace = material.namespace;
simpleName = material.simpleName;
loadActualPr... | private void blockIdOrDataChanged() {
int blockType = comboBoxBlockType.getSelectedIndex();
int dataValue = (Integer) spinnerDataValue.getValue();
if ((blockType < 0) || (blockType > 4095) || (dataValue < 0) || (dataValue > 15)) {
// No idea why this happens, but it has been observed... | null | null | null | https://github.com/Captain-Chaos/WorldPainter/commit/020c7d3eb35f818f61931d073e9885bc8ce1bca8 | Bug fix: actions that need a world and/or dimension to be set beep instead of crashing
Don't crash when stored hidden palette name does not exist as a palette (not clear how that can happen; perhaps it only contains hidden layers from CombinedLayers?) | WorldPainter/WPGUI/src/main/java/org/pepsoft/worldpainter/MaterialSelector.java | java | 2022-10-23T12:19:29Z |
public void addObjectLight(TileObject tileObject, int plane, int sizeX, int sizeY, int orientation)
{
for (Light l : OBJECT_LIGHTS.get(tileObject.getId()))
{
// prevent duplicate lights being spawned for the same object
if (sceneLights.stream().anyMatch(light -> light.object != null && tileObjectHash(light.o... | public void addObjectLight(TileObject tileObject, int plane, int sizeX, int sizeY, int orientation)
{
for (Light l : OBJECT_LIGHTS.get(tileObject.getId()))
{
// prevent objects at plane -1 and under from having lights
if (tileObject.getPlane() <= -1) {
continue;
}
// prevent duplicate lights being... | null | null | null | https://github.com/RS117/RLHD/commit/300fe8495d5cd4d4d1bad9a9f36f694d08017950 | Light Crash Fixes (#322)
* Light Crash Fixes
Made it to if the plane is -1 or under it defaults to 0 to stop any crashes
* Object 14419 is what was causing the issues
- Ignore Objects at -1 and below
- Ignore Npcs at -1 and below | src/main/java/rs117/hd/scene/lighting/LightManager.java | java | 2022-07-01T23:41:47Z |
static void nbd_co_receive_reply(NBDClientSession *s,
NBDRequest *request,
NBDReply *reply,
QEMUIOVector *qiov)
{
int ret;
qemu_coroutine_yield();
*reply = s->reply;
if (reply->handle != request->hand... | static void nbd_co_receive_reply(NBDClientSession *s,
NBDRequest *request,
NBDReply *reply,
QEMUIOVector *qiov)
{
int ret;
qemu_coroutine_yield();
*reply = s->reply;
if (reply->handle != request->hand... | null | null | null | qemu/commit/72b6ffc76653214b69a94a7b1643ff80df134486 | nbd-client: Fix regression when server sends garbage
When we switched NBD to use coroutines for qemu 2.9 (in particular,
commit a12a712a), we introduced a regression: if a server sends us
garbage (such as a corrupted magic number), we quit the read loop
but do not stop sending further queued commands, resulting in the... | ./qemu/block/nbd-client.c | c | 2017-08-14T21:34:26Z |
PUBLIC ssize httpWriteUploadData(HttpConn *conn, MprList *fileData, MprList *formData)
{
char *path, *pair, *key, *value, *name;
cchar *type;
ssize rc;
int next;
rc = 0;
if (formData) {
for (rc = next = 0; rc >= 0 && (pair = mprGetNextItem(formData, &next)) != 0; ) {
... | PUBLIC ssize httpWriteUploadData(HttpConn *conn, MprList *fileData, MprList *formData)
{
char *path, *pair, *key, *value, *name;
cchar *type;
ssize rc;
int next;
rc = 0;
if (formData) {
for (rc = next = 0; rc >= 0 && (pair = mprGetNextItem(formData, &next)) != 0; ) {
... | CVE-2014-9708 | CWE-476 | Embedthis Appweb before 4.6.6 and 5.x before 5.2.1 allows remote attackers to cause a denial of service (NULL pointer dereference) via a Range header with an empty value, as demonstrated by "Range: x=,". | https://github.com/embedthis/appweb/commit/7e6a925f5e86a19a7934a94bbd6959101d0b84eb | DEV: switch to use ssplit and mprReadJson
ssplit is more robust than stok because it does not return null
mprReadJson is faster, simpler and does not support dotted keys. | httpLib.c | c | 2015-03-31T14:59:00Z |
struct clock_source *dce100_clock_source_create(
struct dc_context *ctx,
struct dc_bios *bios,
enum clock_source_id id,
const struct dce110_clk_src_regs *regs,
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
kzalloc(sizeof(struct dce110_clk_src), GFP_KERNEL);
if (!clk_src)
return NULL;
if (dce110_clk_... | struct clock_source *dce100_clock_source_create(
struct dc_context *ctx,
struct dc_bios *bios,
enum clock_source_id id,
const struct dce110_clk_src_regs *regs,
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
kzalloc(sizeof(struct dce110_clk_src), GFP_KERNEL);
if (!clk_src)
return NULL;
if (dce110_clk_... | CVE-2019-19083 | CWE-703 | Memory leaks in *clock_source_create() functions under drivers/gpu/drm/amd/display/dc in the Linux kernel before 5.3.8 allow attackers to cause a denial of service (memory consumption). This affects the dce112_clock_source_create() function in drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c, the dce100_clock_so... | https://github.com/torvalds/linux/commit/055e547478a11a6360c7ce05e2afc3e366968a12 | drm/amd/display: memory leak
In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated
clk_src needs release.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | dce100_resource.c | c | 2019-09-17T03:20:44Z |
get_pols_2_svc(gpols_arg *arg, struct svc_req *rqstp)
{
static gpols_ret ret;
char *prime_arg;
gss_buffer_desc client_name,
service_name;
OM_uint32 minor_stat;
kadm5_server_handle_t handle;
const ch... | get_pols_2_svc(gpols_arg *arg, struct svc_req *rqstp)
{
static gpols_ret ret;
char *prime_arg;
gss_buffer_desc client_name = GSS_C_EMPTY_BUFFER;
gss_buffer_desc service_name = GSS_C_EMPTY_BUFFER;
OM_uint32 ... | CVE-2015-8631 | CWE-772 | Multiple memory leaks in kadmin/server/server_stubs.c in kadmind in MIT Kerberos 5 (aka krb5) before 1.13.4 and 1.14.x before 1.14.1 allow remote authenticated users to cause a denial of service (memory consumption) via a request specifying a NULL principal name. | https://github.com/krb5/krb5/commit/83ed75feba32e46f736fcce0d96a0445f29b96c2 | Fix leaks in kadmin server stubs [CVE-2015-8631]
In each kadmind server stub, initialize the client_name and
server_name variables, and release them in the cleanup handler. Many
of the stubs will otherwise leak the client and server name if
krb5_unparse_name() fails. Also make sure to free the prime_arg
variables in... | server_stubs.c | c | 2016-01-08T18:16:54Z |
scsi_nl_rcv_msg(struct sk_buff *skb)
{
struct nlmsghdr *nlh;
struct scsi_nl_hdr *hdr;
u32 rlen;
int err, tport;
while (skb->len >= NLMSG_HDRLEN) {
err = 0;
nlh = nlmsg_hdr(skb);
if ((nlh->nlmsg_len < (sizeof(*nlh) + sizeof(*hdr))) ||
(skb->len < nlh->nlmsg_len)) {
printk(KERN_WARNING "%s: discardi... | scsi_nl_rcv_msg(struct sk_buff *skb)
{
struct nlmsghdr *nlh;
struct scsi_nl_hdr *hdr;
u32 rlen;
int err, tport;
while (skb->len >= NLMSG_HDRLEN) {
err = 0;
nlh = nlmsg_hdr(skb);
if ((nlh->nlmsg_len < (sizeof(*nlh) + sizeof(*hdr))) ||
(skb->len < nlh->nlmsg_len)) {
printk(KERN_WARNING "%s: discardi... | CVE-2014-0181 | CWE-264 | The Netlink implementation in the Linux kernel through 3.14.1 does not provide a mechanism for authorizing socket operations based on the opener of a socket, which allows local users to bypass intended access restrictions and modify network configurations by using a Netlink socket for the (1) stdout or (2) stderr of a ... | https://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=90f62cf30a78721641e08737bda787552428061e | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... | null | null | null |
char* _multi_string_alloc_and_copy( LPCWSTR in )
{
char *chr;
int len = 0;
if ( !in )
{
return in;
}
while ( in[ len ] != 0 || in[ len + 1 ] != 0 )
{
len ++;
}
chr = malloc( len + 2 );
len = 0;
while ( in[ len ] != 0 || in[ len + 1 ] != 0 )
{
c... | char* _multi_string_alloc_and_copy( LPCWSTR in )
{
char *chr;
int len = 0;
if ( !in )
{
return NULL;
}
while ( in[ len ] != 0 || in[ len + 1 ] != 0 )
{
len ++;
}
chr = malloc( len + 2 );
len = 0;
while ( in[ len ] != 0 || in[ len + 1 ] != 0 )
{
... | CVE-2018-7485 | CWE-119 | The SQLWriteFileDSN function in odbcinst/SQLWriteFileDSN.c in unixODBC 2.3.5 has strncpy arguments in the wrong order, which allows attackers to cause a denial of service or possibly have unspecified other impact. | https://github.com/lurcher/unixODBC/commit/45ef78e037f578b15fc58938a3a3251655e71d6f | New Pre Source | SQLSetDescField.c | c | 2018-01-08T11:12:39Z |
private NSBitmapImageRep createRepresentation(ImageData imageData, AlphaInfo alphaInfo) {
NSBitmapImageRep rep = (NSBitmapImageRep)new NSBitmapImageRep().alloc();
PaletteData palette = imageData.palette;
if (!(((imageData.depth == 1 || imageData.depth == 2 || imageData.depth == 4 || imageData.depth == 8) && !palett... | private NSBitmapImageRep createRepresentation(ImageData imageData, AlphaInfo alphaInfo) {
NSBitmapImageRep rep = (NSBitmapImageRep)new NSBitmapImageRep().alloc();
PaletteData palette = imageData.palette;
if (!(((imageData.depth == 1 || imageData.depth == 2 || imageData.depth == 4 || imageData.depth == 8 || imageDat... | null | null | null | https://github.com/eclipse-platform/eclipse.platform.swt/commit/5e05910ac3ed3bece28ee55762e3215542a69d73 | Issue #232 - Add support for 16bpp indexed ImageData
Also, variables `srcStride`, `destStride` were hijacked into a different
meaning in the old code. I reworked them into new variables with proper
names `srcPixelsPerStride`, `dstPixelsPerStride`.
This commit only supports loading images. Other things remain
unsuppor... | bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java | java | 2022-07-07T20:14:12Z |
void dtls1_reset_seq_numbers(SSL *s, int rw)
{
unsigned char *seq;
unsigned int seq_bytes = sizeof(s->s3->read_sequence);
if (rw & SSL3_CC_READ) {
seq = s->s3->read_sequence;
s->d1->r_epoch++;
memcpy(&(s->d1->bitmap), &(s->d1->next_bitmap), sizeof(DTLS1_BITMAP));
memset(&(s-... | void dtls1_reset_seq_numbers(SSL *s, int rw)
{
unsigned char *seq;
unsigned int seq_bytes = sizeof(s->s3->read_sequence);
if (rw & SSL3_CC_READ) {
seq = s->s3->read_sequence;
s->d1->r_epoch++;
memcpy(&(s->d1->bitmap), &(s->d1->next_bitmap), sizeof(DTLS1_BITMAP));
memset(&(s-... | CVE-2016-2179 | CWE-399 | The DTLS implementation in OpenSSL before 1.1.0 does not properly restrict the lifetime of queue entries associated with unused out-of-order messages, which allows remote attackers to cause a denial of service (memory consumption) by maintaining many crafted DTLS sessions simultaneously, related to d1_lib.c, statem_dtl... | https://github.com/openssl/openssl/commit/cfd40fd39e69f5e3c654ae8fbf9acb1d2a051144 | Prevent DTLS Finished message injection
Follow on from CVE-2016-2179
The investigation and analysis of CVE-2016-2179 highlighted a related flaw.
This commit fixes a security "near miss" in the buffered message handling
code. Ultimately this is not currently believed to be exploitable due to
the reasons outlined belo... | null | null | 2016-06-30T14:06:27Z |
static int override_release(char __user *release, int len)
{
int ret = 0;
char buf[65];
if (current->personality & UNAME26) {
char *rest = UTS_RELEASE;
int ndots = 0;
unsigned v;
while (*rest) {
if (*rest == '.' && ++ndots >= 3)
break;
if (!isdigit(*rest) && *rest != '.')
break;
... | static int override_release(char __user *release, int len)
static int override_release(char __user *release, size_t len)
{
int ret = 0;
if (current->personality & UNAME26) {
const char *rest = UTS_RELEASE;
char buf[65] = { 0 };
int ndots = 0;
unsigned v;
size_t copy;
while (*rest) {
if (*res... | CVE-2012-0957 | CWE-16 | The override_release function in kernel/sys.c in the Linux kernel before 3.4.16 allows local users to obtain sensitive information from kernel stack memory via a uname system call in conjunction with a UNAME26 personality. | https://github.com/torvalds/linux/commit/2702b1526c7278c4d65d78de209a465d4de2885e | kernel/sys.c: fix stack memory content leak via UNAME26
Calling uname() with the UNAME26 personality set allows a leak of kernel
stack contents. This fixes it by defensively calculating the length of
copy_to_user() call, making the len argument unsigned, and initializing
the stack buffer to zero (now technically unne... | kernel/sys.c | c | 2012-10-19T20:56:51Z |
@POST
@Consumes({MEDIA_TYPE_SCIM_JSON, MediaType.APPLICATION_JSON})
@Produces({MEDIA_TYPE_SCIM_JSON + UTF8_CHARSET_FRAGMENT, MediaType.APPLICATION_JSON + UTF8_CHARSET_FRAGMENT})
@HeaderParam("Accept") @DefaultValue(MEDIA_TYPE_SCIM_JSON)
@ProtectedApi(scopes = {"https://jans.io/scim/users.write"})
@R... | @POST
@Consumes({MEDIA_TYPE_SCIM_JSON, MediaType.APPLICATION_JSON})
@Produces({MEDIA_TYPE_SCIM_JSON + UTF8_CHARSET_FRAGMENT, MediaType.APPLICATION_JSON + UTF8_CHARSET_FRAGMENT})
@HeaderParam("Accept") @DefaultValue(MEDIA_TYPE_SCIM_JSON)
@ProtectedApi(scopes = {"https://jans.io/scim/users.write"})
@R... | null | null | null | https://github.com/JanssenProject/jans/commit/4b239af72d8aa9e3a09ff6de19cf315b3863bda2 | fix: update authn schemes in yaml descriptor #2414 (#2415) | jans-scim/server/src/main/java/io/jans/scim/ws/rs/scim2/UserWebService.java | java | 2022-09-19T09:41:42Z |
static Image *ReadEPTImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
EPTInfo
ept_info;
Image
*image;
ImageInfo
*read_info;
MagickBooleanType
status;
MagickOffsetType
offset;
ssize_t
count;
/*
Open image file.
*/
assert(image_info != (const ImageInfo *) N... | static Image *ReadEPTImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
EPTInfo
ept_info;
Image
*image;
ImageInfo
*read_info;
MagickBooleanType
status;
MagickOffsetType
offset;
ssize_t
count;
/*
Open image file.
*/
assert(image_info != (const ImageInfo *) N... | null | null | null | https://github.com/ImageMagick/ImageMagick/commit/a14e7f1f78d99891132e061c05f83aefc59e049a | https://github.com/ImageMagick/ImageMagick/issues/524 | coders/ept.c | c | 2017-06-24T12:23:11Z |
@Override
public void onDestroy() {
super.onDestroy();
runningProcess.destroy();
} | @Override
public void onDestroy() {
super.onDestroy();
if (null != runningProcess) {
runningProcess.destroy();
}
} | null | null | null | https://github.com/x0b/rcx/commit/047e5f5ea237729af3253d335d453cf7176154b3 | StreamingService: Fix crash when service is killed
Ref: NullPointerException @ StreamingService.java:124 | app/src/main/java/ca/pkay/rcloneexplorer/Services/StreamingService.java | java | 2020-06-03T20:24:08Z |
void Compute(OpKernelContext* ctx) override {
const Tensor& val = ctx->input(0);
int64 id = ctx->session_state()->GetNewId();
TensorStore::TensorAndKey tk{val, id, requested_device()};
OP_REQUIRES_OK(ctx, ctx->tensor_store()->AddTensor(name(), tk));
Tensor* handle = nullptr;
OP_REQUIRES_OK(ctx,... | void Compute(OpKernelContext* ctx) override {
const Tensor& val = ctx->input(0);
auto session_state = ctx->session_state();
OP_REQUIRES(ctx, session_state != nullptr,
errors::FailedPrecondition(
"GetSessionHandle called on null session state"));
int64 id = session_sta... | CVE-2020-15204 | cwe-476 | In eager mode, TensorFlow before versions 1.15.4, 2.0.3, 2.1.2, 2.2.1 and 2.3.1 does not set the session state. Hence, calling `tf.raw_ops.GetSessionHandle` or `tf.raw_ops.GetSessionHandleV2` results in a null pointer dereference In linked snippet, in eager mode, `ctx->session_state()` returns `nullptr`. Since code imm... | github.com/tensorflow/tensorflow/commit/9a133d73ae4b4664d22bd1aa6d654fec13c52ee1 | Prevent segfault in `GetSessionHandle{,V2}`.
In eager mode, session state is null.
PiperOrigin-RevId: 332548597
Change-Id: If094812c2e094044220b9ba28f7d7601be042f38 | session_ops.cc | cc | 2020-09-18T23:23:20Z |
static void *av_mallocz_static(unsigned int size)
{
void *ptr = av_mallocz(size);
if(ptr){
array_static =av_fast_realloc(array_static, &allocated_static, sizeof(void*)*(last_static+1));
if(!array_static)
return NULL;
array_static[last_static++] = ptr;
}
return ptr;
} | static void *av_mallocz_static(unsigned int size)
{
return av_mallocz(size);
} | null | null | null | FFmpeg/commit/b9c8388710a06544812739eedc0a40d3451491dc | As *_static are not deallocated anymore except on program termination
we do not need to keep track of them anymore.
Fixes CID117 RUN2 and various race conditions.
Originally committed as revision 13571 to svn://svn.ffmpeg.org/ffmpeg/trunk | ./ffmpeg/libavcodec/bitstream.c | c | 2008-05-30T23:26:09Z |
protected OkHttpClient getHttpClient() {
if (okHttpClient == null) {
okHttpClient = new OkHttpClient();
}
Authenticator proxyAuthenticator = (route, response) -> {
String credential = Credentials.basic(System.getProperty(HTTP_PROXY_USER), System.getProperty(HTTP_PROXY_PASS));
return respo... | protected OkHttpClient getHttpClient() {
if (okHttpClient == null) {
okHttpClient = new OkHttpClient();
}
Authenticator proxyAuthenticator = getAuthenticator();
OkHttpClient.Builder builder = okHttpClient.newBuilder();
if (logger != null) builder.addInterceptor(logger);
builder.addInterc... | null | null | null | https://github.com/hapifhir/org.hl7.fhir.core/commit/82972d5216f787a6f53dada3b219b23e61a55289 | Add https-proxy param + fix proxy authorization header (#888)
Co-authored-by: dotasek <david.otasek@smilecdr.com> | org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/client/network/FhirRequestBuilder.java | java | 2022-11-17T16:27:21Z |
static void perf_event_init_cpu(int cpu)
{
struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu);
mutex_lock(&swhash->hlist_mutex);
swhash->online = true;
if (swhash->hlist_refcount > 0) {
struct swevent_hlist *hlist;
hlist = kzalloc_node(sizeof(*hlist), GFP_KERNEL, cpu_to_node(cpu));
WARN_ON(!hlist... | static void perf_event_init_cpu(int cpu)
{
struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu);
mutex_lock(&swhash->hlist_mutex);
if (swhash->hlist_refcount > 0) {
struct swevent_hlist *hlist;
hlist = kzalloc_node(sizeof(*hlist), GFP_KERNEL, cpu_to_node(cpu));
WARN_ON(!hlist);
rcu_assign_pointer(... | null | CWE-416, CWE-362 | null | https://github.com/torvalds/linux/commit/12ca6ad2e3a896256f086497a7c7406a547ee373 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent die... | null | null | 2015-12-15T12:49:05Z |
parse_array(JsonLexContext *lex, JsonSemAction *sem)
{
/*
* an array is a possibly empty sequence of array elements, separated by
* commas and surrounded by square brackets.
*/
json_struct_action astart = sem->array_start;
json_struct_action aend = sem->array_end;
json_struct_action astart = sem->array_sta... | parse_array(JsonLexContext *lex, JsonSemAction *sem)
{
/*
* an array is a possibly empty sequence of array elements, separated by
* commas and surrounded by square brackets.
*/
json_struct_action astart = sem->array_start;
json_struct_action aend = sem->array_end;
json_struct_action astart = sem->array_sta... | CVE-2015-5289 | CWE-119 | Multiple stack-based buffer overflows in json parsing in PostgreSQL before 9.3.x before 9.3.10 and 9.4.x before 9.4.5 allow attackers to cause a denial of service (server crash) via unspecified vectors, which are not properly handled in (1) json or (2) jsonb values. | https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=08fa47c4850cea32c3116665975bca219fbf2fe6 | null | null | c | null |
static int xwma_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
int64_t size, av_uninit(data_size);
uint32_t dpds_table_size = 0;
uint32_t *dpds_table = 0;
unsigned int tag;
AVIOContext *pb = s->pb;
AVStream *st;
XWMAContext *xwma = s->priv_data;
int i;
tag = avio... | static int xwma_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
int64_t size, av_uninit(data_size);
int ret;
uint32_t dpds_table_size = 0;
uint32_t *dpds_table = 0;
unsigned int tag;
AVIOContext *pb = s->pb;
AVStream *st;
XWMAContext *xwma = s->priv_data;
int i;
... | null | null | null | FFmpeg/commit/ca402f32e392590a81a1381dab41c4f9c2c2f98a | handle malloc failures in ff_get_wav_header
ff_get_wav_header is reading data from a WAVE file and then uses it
(without validation) to malloc a buffer. It then proceeded to read
data into the buffer, without verifying that the allocation succeeded.
To address this, change ff_get_wav_header to return an error if
allo... | ./ffmpeg/libavformat/xwma.c | c | 2011-04-12T15:44:20Z |
void eb_read_bin(eb_t a, const uint8_t *bin, int len) {
if (len == 1) {
if (bin[0] == 0) {
eb_set_infty(a);
return;
} else {
RLC_THROW(ERR_NO_BUFFER);
return;
}
}
if (len != (RLC_FB_BYTES + 1) && len != (2 * RLC_FB_BYTES + 1)) {
RLC_THROW(ERR_NO_BUFFER);
return;
}
a->coord = BASIC;
fb_set_... | void eb_read_bin(eb_t a, const uint8_t *bin, size_t len) {
if (len == 1) {
if (bin[0] == 0) {
eb_set_infty(a);
return;
} else {
RLC_THROW(ERR_NO_BUFFER);
return;
}
}
if (len != (RLC_FB_BYTES + 1) && len != (2 * RLC_FB_BYTES + 1)) {
RLC_THROW(ERR_NO_BUFFER);
return;
}
a->coord = BASIC;
fb_s... | null | null | null | https://github.com/relic-toolkit/relic/commit/34580d840469361ba9b5f001361cad659687b9ab | Huge commit improving the API to use size_t instead of int. | src/eb/relic_eb_util.c | c | 2022-11-14T20:47:12Z |
static char *expandRequestTokens(HttpConn *conn, char *str)
{
HttpRx *rx;
HttpTx *tx;
HttpRoute *route;
MprBuf *buf;
HttpLang *lang;
char *tok, *cp, *key, *value, *field, *header, *defaultValue, *state, *v, *p;
assert(conn);
assert(str);
rx = conn->rx;
... | static char *expandRequestTokens(HttpConn *conn, char *str)
{
HttpRx *rx;
HttpTx *tx;
HttpRoute *route;
MprBuf *buf;
HttpLang *lang;
char *tok, *cp, *key, *value, *field, *header, *defaultValue, *state, *v, *p;
assert(conn);
assert(str);
rx = conn->rx;
... | CVE-2014-9708 | CWE-476 | Embedthis Appweb before 4.6.6 and 5.x before 5.2.1 allows remote attackers to cause a denial of service (NULL pointer dereference) via a Range header with an empty value, as demonstrated by "Range: x=,". | https://github.com/embedthis/appweb/commit/7e6a925f5e86a19a7934a94bbd6959101d0b84eb | DEV: switch to use ssplit and mprReadJson
ssplit is more robust than stok because it does not return null
mprReadJson is faster, simpler and does not support dotted keys. | httpLib.c | c | 2015-03-31T14:59:00Z |
static void
lexer_parse_number (parser_context_t *context_p) /**< context */
{
const uint8_t *source_p = context_p->source_p;
const uint8_t *source_end_p = context_p->source_end_p;
bool can_be_float = false;
#if ENABLED (JERRY_BUILTIN_BIGINT)
bool can_be_bigint = true;
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) *... | static void
lexer_parse_number (parser_context_t *context_p) /**< context */
{
const uint8_t *source_p = context_p->source_p;
const uint8_t *source_end_p = context_p->source_end_p;
bool can_be_float = false;
#if ENABLED (JERRY_BUILTIN_BIGINT)
bool can_be_bigint = true;
#endif /* ENABLED (JERRY_BUILTIN_BIGINT) *... | null | null | null | https://github.com/jerryscript-project/jerryscript/commit/a2a1c97bfbbd856e2ee9b5bafd10b1d18ce7d1fe | Fix underscore lookahead in hex literal parsing
This patch fixes #4442.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu | jerry-core/parser/js/js-lexer.c | c | 2021-01-11T14:52:59Z |
BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
{
int i;
BIO *out = NULL, *btmp = NULL;
X509_ALGOR *xa = NULL;
const EVP_CIPHER *evp_cipher = NULL;
STACK_OF(X509_ALGOR) *md_sk = NULL;
STACK_OF(PKCS7_RECIP_INFO) *rsk = NULL;
X509_ALGOR *xalg = NULL;
PKCS7_RECIP_INFO *ri = NULL;
EVP_PKEY *pke... | BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
{
int i;
BIO *out = NULL, *btmp = NULL;
X509_ALGOR *xa = NULL;
const EVP_CIPHER *evp_cipher = NULL;
STACK_OF(X509_ALGOR) *md_sk = NULL;
STACK_OF(PKCS7_RECIP_INFO) *rsk = NULL;
X509_ALGOR *xalg = NULL;
PKCS7_RECIP_INFO *ri = NULL;
EVP_PKEY *pke... | CVE-2015-0289 | null | The PKCS#7 implementation in OpenSSL before 0.9.8zf, 1.0.0 before 1.0.0r, 1.0.1 before 1.0.1m, and 1.0.2 before 1.0.2a does not properly handle a lack of outer ContentInfo, which allows attackers to cause a denial of service (NULL pointer dereference and application crash) by leveraging an application that processes ar... | https://git.openssl.org/?p=openssl.git;a=commitdiff;h=544e3e3b69d080ee87721bd03c37b4d450384fb9 | PKCS#7: avoid NULL pointer dereferences with missing content
In PKCS#7, the ASN.1 content component is optional.
This typically applies to inner content (detached signatures),
however we must also handle unexpected missing outer content
correctly.
This patch only addresses functions reachable from parsing,
decryption... | null | null | null |
hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)
{
unsigned long orun = 1;
ktime_t delta;
delta = ktime_sub(now, timer->expires);
if (delta.tv64 < 0)
return 0;
if (interval.tv64 < timer->base->resolution.tv64)
interval.tv64 = timer->base->resolution.tv64;
if (unlikely(delta.tv64 >= in... | hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)
{
unsigned long orun = 1;
ktime_t delta;
delta = ktime_sub(now, timer->expires);
if (delta.tv64 < 0)
return 0;
if (interval.tv64 < timer->base->resolution.tv64)
interval.tv64 = timer->base->resolution.tv64;
if (unlikely(delta.tv64 >= in... | CVE-2007-6712 | CWE-189 | Integer overflow in the hrtimer_forward function (hrtimer.c) in Linux kernel 2.6.21-rc4, when running on 64-bit systems, allows local users to cause a denial of service (infinite loop) via a timer with a large expiry value, which causes the timer to always be expired. | http://git.kernel.org/?p=linux/kernel/git/chris/linux-2.6.git;a=commitdiff;h=13788ccc41ceea5893f9c747c59bc0b28f2416c2 | [PATCH] hrtimer: prevent overrun DoS in hrtimer_forward()
hrtimer_forward() does not check for the possible overflow of
timer->expires. This can happen on 64 bit machines with large interval
values and results currently in an endless loop in the softirq because the
expiry value becomes negative and therefor the timer... | null | null | null |
static void ExpandMirrorKernelInfo(KernelInfo *kernel)
{
KernelInfo
*clone,
*last;
last = kernel;
clone = CloneKernelInfo(last);
RotateKernelInfo(clone, 180); /* flip */
LastKernelInfo(last)->next = clone;
last = clone;
clone = CloneKernelInfo(last);
RotateKernelInfo(clone, 90); /* transp... | static void ExpandMirrorKernelInfo(KernelInfo *kernel)
{
KernelInfo
*clone,
*last;
last = kernel;
clone = CloneKernelInfo(last);
if (clone == (KernelInfo *) NULL)
return;
RotateKernelInfo(clone, 180); /* flip */
LastKernelInfo(last)->next = clone;
last = clone;
clone = CloneKernelInfo(l... | null | null | null | https://github.com/ImageMagick/ImageMagick/commit/a88493a9f25187e194f1ab8d15f346e87d8ebad0 | https://github.com/ImageMagick/ImageMagick/issues/77 | magick/morphology.c | c | 2017-09-22T13:07:41Z |
async def impl(request: Request, handler: _Handler) -> StreamResponse:
if isinstance(request.match_info.route, SystemRoute):
paths_to_check = []
if "?" in request.raw_path:
path, query = request.raw_path.split("?", 1)
query = "?" + query
else:
... | async def impl(request: Request, handler: _Handler) -> StreamResponse:
if isinstance(request.match_info.route, SystemRoute):
paths_to_check = []
if "?" in request.raw_path:
path, query = request.raw_path.split("?", 1)
query = "?" + query
else:
... | null | null | null | https://github.com/aio-libs/aiohttp/commit/2545222a3853e31ace15d87ae0e2effb7da0c96b | Merge branch 'ghsa-v6wp-4m6f-gcjg' into master
This patch fixes an open redirect vulnerability bug in
`aiohttp.web_middlewares.normalize_path_middleware` by
making sure that there's at most one slash at the
beginning of the `Location` header value.
Refs:
* https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Re... | aiohttp/web_middlewares.py | py | 2021-02-25T17:58:51Z |
static av_cold int libgsm_close(AVCodecContext *avctx) {
gsm_destroy(avctx->priv_data);
avctx->priv_data = NULL;
return 0;
} | static av_cold int libgsm_close(AVCodecContext *avctx) {
av_freep(&avctx->coded_frame);
gsm_destroy(avctx->priv_data);
avctx->priv_data = NULL;
return 0;
} | null | null | null | FFmpeg/commit/916ff02261f79e759d996c76670958276276bf2a | Fix memory leak in libgsm wrapper.
Patch by Martin Storsjö, martin at martin dot st
Originally committed as revision 15798 to svn://svn.ffmpeg.org/ffmpeg/trunk | ./ffmpeg/libavcodec/libgsm.c | c | 2008-11-10T20:02:00Z |
int avpriv_unlock_avformat(void)
{
if (lockmgr_cb) {
if ((*lockmgr_cb)(&avformat_mutex, AV_LOCK_RELEASE))
return -1;
}
return 0;
} | int avpriv_unlock_avformat(void)
{
return ff_mutex_unlock(&avformat_mutex) ? -1 : 0;
} | null | null | null | FFmpeg/commit/a04c2c707de2ce850f79870e84ac9d7ec7aa9143 | lavc: replace and deprecate the lock manager
Use static mutexes instead of requiring a lock manager. The behavior
should be roughly the same before and after this change for API users
which did not set the lock manager at all (except that a minor memory
leak disappears). | ./ffmpeg/libavcodec/utils.c | c | 2017-12-21T21:39:24Z |
static int formatIPTCfromBuffer(Image *ofile, char *s, ssize_t len)
{
char
temp[MagickPathExtent];
unsigned int
foundiptc,
tagsfound;
unsigned char
recnum,
dataset;
unsigned char
*readable,
*str;
ssize_t
tagindx,
taglen;
int
i,
tagcount = (int) (sizeof(tags) ... | static int formatIPTCfromBuffer(Image *ofile, char *s, ssize_t len)
{
char
temp[MagickPathExtent];
unsigned int
foundiptc,
tagsfound;
unsigned char
recnum,
dataset;
unsigned char
*readable,
*str;
ssize_t
tagindx,
taglen;
int
i,
tagcount = (int) (sizeof(tags) ... | null | null | null | https://github.com/ImageMagick/ImageMagick/commit/33d1b9590c401d4aee666ffd10b16868a38cf705 | https://github.com/ImageMagick/ImageMagick/issues/1118 | coders/meta.c | c | 2018-05-01T23:22:19Z |
@Override public Object read(JsonReader in) throws IOException {
JsonToken token = in.peek();
switch (token) {
case BEGIN_ARRAY:
List<Object> list = new ArrayList<>();
in.beginArray();
while (in.hasNext()) {
list.add(read(in));
}
in.endArray();
return list;
c... | @Override public Object read(JsonReader in) throws IOException {
// Either List or Map
Object current;
JsonToken peeked = in.peek();
current = tryBeginNesting(in, peeked);
if (current == null) {
return readTerminal(in, peeked);
}
Deque<Object> stack = new ArrayDeque<>();
while (... | null | null | null | https://github.com/google/gson/commit/2d01d6a20f39881c692977564c1ea591d9f39027 | Make `Object` and `JsonElement` deserialization iterative (#1912)
* Make Object and JsonElement deserialization iterative
Often when Object and JsonElement are deserialized the format of the JSON
data is unknown and it might come from an untrusted source. To avoid a
StackOverflowError from maliciously crafted JSON, d... | gson/src/main/java/com/google/gson/internal/bind/ObjectTypeAdapter.java | java | 2022-06-23T00:42:19Z |
int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
int apply_defdispwin, AVBufferRef **vps_list, AVCodecContext *avctx)
{
HEVCWindow *ow;
int ret = 0;
int log2_diff_max_min_transform_block_size;
int bit_depth_chroma, start, vui_present, sublayer_ordering_i... | int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
int apply_defdispwin, AVBufferRef **vps_list, AVCodecContext *avctx)
{
HEVCWindow *ow;
int ret = 0;
int log2_diff_max_min_transform_block_size;
int bit_depth_chroma, start, vui_present, sublayer_ordering_i... | null | null | null | FFmpeg/commit/1329c08ad6d2ddb304858f2972c67b508e8b0f0e | hevc: Validate the number of long term reference pictures
This would overflow if the stream contained a value greater than the
maximum allowed by the standard (32). | ./ffmpeg/libavcodec/hevc_ps.c | c | 2017-06-23T23:29:14Z |
vu_queue_notify(VuDev *dev, VuVirtq *vq)
{
if (unlikely(dev->broken)) {
return;
}
if (!vring_notify(dev, vq)) {
DPRINT("skipped notify...\n");
return;
}
if (eventfd_write(vq->call_fd, 1) < 0) {
vu_panic(dev, "Error writing eventfd: %s", strerror(errno));
}
} | vu_queue_notify(VuDev *dev, VuVirtq *vq)
{
if (unlikely(dev->broken) ||
unlikely(!vq->vring.avail)) {
return;
}
if (!vring_notify(dev, vq)) {
DPRINT("skipped notify...\n");
return;
}
if (eventfd_write(vq->call_fd, 1) < 0) {
vu_panic(dev, "Error writing eventfd... | null | null | null | qemu/commit/640601c7cb1b6b41d3e1a435b986266c2b71e9bc | libvhost-user: fix crash when rings aren't ready
Calling libvhost-user functions like vu_queue_get_avail_bytes() when the
queue doesn't yet have addresses will result in the crashes like the
following:
Program received signal SIGSEGV, Segmentation fault.
0x000055c414112ce4 in vring_avail_idx (vq=0x55c41582fd68, vq=0x... | ./qemu/contrib/libvhost-user/libvhost-user.c | c | 2017-05-03T16:54:12Z |
void ep_map_dst(ep_t p, const uint8_t *msg, int len, const uint8_t *dst,
int dst_len) {
/* enough space for two field elements plus extra bytes for uniformity */
const int len_per_elm = (FP_PRIME + ep_param_level() + 7) / 8;
uint8_t *pseudo_random_bytes = RLC_ALLOCA(uint8_t, 2 * len_per_elm);
RLC_TRY {
/* for... | void ep_map_dst(ep_t p, const uint8_t *msg, size_t len, const uint8_t *dst,
size_t dst_len) {
/* enough space for two field elements plus extra bytes for uniformity */
const int len_per_elm = (FP_PRIME + ep_param_level() + 7) / 8;
uint8_t *pseudo_random_bytes = RLC_ALLOCA(uint8_t, 2 * len_per_elm);
RLC_TRY {
... | null | null | null | https://github.com/relic-toolkit/relic/commit/34580d840469361ba9b5f001361cad659687b9ab | Huge commit improving the API to use size_t instead of int. | src/ep/relic_ep_map.c | c | 2022-11-14T20:47:12Z |
AP4_Processor::Process(AP4_ByteStream& input,
AP4_ByteStream& output,
AP4_ByteStream* fragments,
ProgressListener* listener,
AP4_AtomFactory& atom_factory)
{
// read all atoms.
// keep all atoms except [mdat]
... | AP4_Processor::Process(AP4_ByteStream& input,
AP4_ByteStream& output,
ProgressListener* listener,
AP4_AtomFactory& atom_factory)
{
return Process(input, output, NULL, listener, atom_factory);
} | null | CWE-476, CWE-703 | null | https://github.com/axiomatic-systems/Bento4/commit/4d3f0bebd5f8518fd775f671c12bea58c68e814e | fixed possible crashes on malformed inputs. | null | null | 2017-07-30T22:29:24Z |
static int rtsx_usb_ms_drv_probe(struct platform_device *pdev)
{
struct memstick_host *msh;
struct rtsx_usb_ms *host;
struct rtsx_ucr *ucr;
int err;
ucr = usb_get_intfdata(to_usb_interface(pdev->dev.parent));
if (!ucr)
return -ENXIO;
dev_dbg(&(pdev->dev),
"Realtek USB Memstick controller found\n");
msh ... | static int rtsx_usb_ms_drv_probe(struct platform_device *pdev)
{
struct memstick_host *msh;
struct rtsx_usb_ms *host;
struct rtsx_ucr *ucr;
int err;
ucr = usb_get_intfdata(to_usb_interface(pdev->dev.parent));
if (!ucr)
return -ENXIO;
dev_dbg(&(pdev->dev),
"Realtek USB Memstick controller found\n");
msh ... | CVE-2022-0487 | CWE-416 | A use-after-free vulnerability was found in rtsx_usb_ms_drv_remove in drivers/memstick/host/rtsx_usb_ms.c in memstick in the Linux kernel. In this flaw, a local attacker with a user privilege may impact system Confidentiality. This flaw affects kernel versions prior to 5.14 rc1. | https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=42933c8aa14be1caa9eda41f65cde8a3a95d3e39 | memstick: rtsx_usb_ms: fix UAF
This patch fixes the following issues:
1. memstick_free_host() will free the host, so the use of ms_dev(host) after
it will be a problem. To fix this, move memstick_free_host() after when we
are done with ms_dev(host).
2. In rtsx_usb_ms_drv_remove(), pm need to be disabled before we remo... | null | null | null |
X509::X509(const char* i, size_t iSz, const char* s, size_t sSz,
const char* b, int bSz, const char* a, int aSz)
: issuer_(i, iSz), subject_(s, sSz),
beforeDate_(b, bSz), afterDate_(a, aSz)
{} | X509::X509(const char* i, size_t iSz, const char* s, size_t sSz,
const char* b, int bSz, const char* a, int aSz, int issPos,
int issLen, int subPos, int subLen)
: issuer_(i, iSz, issPos, issLen), subject_(s, sSz, subPos, subLen),
beforeDate_(b, bSz), afterDate_(a, aSz)
{} | CVE-2016-2047 | CWE-254 | The ssl_verify_server_cert function in sql-common/client.c in MariaDB before 5.5.47, 10.0.x before 10.0.23, and 10.1.x before 10.1.10; Oracle MySQL 5.5.48 and earlier, 5.6.29 and earlier, and 5.7.11 and earlier; and Percona Server do not properly verify that the server hostname matches a domain name in the subject's Co... | https://github.com/mysql/mysql-server/commit/e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. | null | null | 2016-02-26T06:23:56Z |
function f(t,e,r){if((e[0]&192)!==128){t.lastNeed=0;return"�"}if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128){t.lastNeed=1;return"�"}if(t.lastNeed>2&&e.length>2){if((e[2]&192)!==128){t.lastNeed=2;return"�"}}}} | function f(t,e,r){if(typeof r!=="number"){r=0}if(r+e.length>t.length){return false}else{return t.indexOf(e,r)!==-1}} | CVE-2021-4306 | CWE-1333 | A vulnerability classified as problematic has been found in cronvel terminal-kit up to 2.1.7. Affected is an unknown function. The manipulation leads to inefficient regular expression complexity. Upgrading to version 2.1.8 is able to address this issue. The name of the patch is a2e446cc3927b559d0281683feb9b821e83b758c.... | https://github.com/cronvel/terminal-kit/commit/a2e446cc3927b559d0281683feb9b821e83b758c | Fix a possible ReDoS | browser/termkit.min.js | js | 2021-10-12T09:55:03Z |
def update(request, pk):
topic = Topic.objects.for_update_or_404(pk, request.user)
category_id = topic.category_id
form = TopicForm(
user=request.user,
data=post_data(request),
instance=topic)
if is_post(request) and form.is_valid():
topic = form.save()
if topic.c... | def update(request, pk):
comment = Comment.objects.for_update_or_404(pk, request.user)
form = CommentForm(data=post_data(request), instance=comment)
if is_post(request) and form.is_valid():
pre_comment_update(comment=Comment.objects.get(pk=comment.pk))
comment = form.save()
post_comm... | CVE-2022-0869 | CWE-601,CWE-601 | Multiple Open Redirect in GitHub repository nitely/spirit prior to 0.12.3. | https://github.com/nitely/spirit/commit/8f32f89654d6c30d56e0dd167059d32146fb32ef | fix unsafe redirect (#308) | views.py | py | 2022-03-06T10:15:00Z |
@Override
public void callSessionHoldReceived(ImsCallProfile profile) {
if (mListener != null) {
TelephonyUtils.runWithCleanCallingIdentity(()-> mListener.callSessionHoldReceived(
ImsCallSession.this, profile), mListenerExecutor);
}
} | @Override
public void callSessionHoldReceived(ImsCallProfile profile) {
TelephonyUtils.runWithCleanCallingIdentity(()-> {
if (mListener != null) {
mListener.callSessionHoldReceived(ImsCallSession.this, profile);
}
}, mListenerExecutor);... | null | null | null | https://github.com/omnirom/android_frameworks_base/commit/be7c8dca0d1ac7dd3b4c0c476e37f2e42093c456 | Fix for crash while merging 2 audio calls for initiating conference call
Null pointer exception occured while calling callsessionupdated on listener object.
Listener turned null at the time of executor method is on run. Null check is present before setting the call to executor.
Modified the null checks to be inside of... | telephony/java/android/telephony/ims/ImsCallSession.java | java | 2022-01-12T04:43:58Z |
block_crypto_open_opts_init(QCryptoBlockFormat format,
QemuOpts *opts,
Error **errp)
{
OptsVisitor *ov;
QCryptoBlockOpenOptions *ret = NULL;
Error *local_err = NULL;
ret = g_new0(QCryptoBlockOpenOptions, 1);
ret->format = format;
ov = opts_... | block_crypto_open_opts_init(QCryptoBlockFormat format,
QemuOpts *opts,
Error **errp)
{
OptsVisitor *ov;
QCryptoBlockOpenOptions *ret = NULL;
Error *local_err = NULL;
Error *end_err = NULL;
ret = g_new0(QCryptoBlockOpenOptions, 1);
ret->form... | null | null | null | qemu/commit/95c3df5a24e2f18129b58691c2ebaf0d86808525 | crypto: Avoid memory leak on failure
Commit 7836857 introduced a memory leak due to invalid use of
Error vs. visit_type_end(). If visiting the intermediate
members fails, we clear the error and unconditionally use
visit_end_struct() on the same error object but if that
cleanup succeeds, we then skip the qapi_free cal... | ./qemu/block/crypto.c | c | 2016-04-01T15:57:02Z |
static int send_sub_rect_jpeg(VncState *vs, int x, int y, int w, int h,
int bg, int fg, int colors,
VncPalette *palette, bool force)
{
int ret;
if (colors == 0) {
if (force || (tight_jpeg_conf[vs->tight.quality].jpeg_full &&
... | static int send_sub_rect_jpeg(VncState *vs, int x, int y, int w, int h,
int bg, int fg, int colors,
VncPalette *palette, bool force)
{
int ret;
if (colors == 0) {
if (force || (tight_jpeg_conf[vs->tight->quality].jpeg_full &&
... | CVE-2019-20382 | CWE-401 | QEMU 4.1.0 has a memory leak in zrle_compress_data in ui/vnc-enc-zrle.c during a VNC disconnect operation because libz is misused, resulting in a situation where memory allocated in deflateInit2 is not freed in deflateEnd. | https://git.qemu.org/?p=qemu.git;a=commitdiff;h=6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0 | vnc: fix memory leak when vnc disconnect
Currently when qemu receives a vnc connect, it creates a 'VncState' to
represent this connection. In 'vnc_worker_thread_loop' it creates a
local 'VncState'. The connection 'VcnState' and local 'VncState' exchange
data in 'vnc_async_encoding_start' and 'vnc_async_encoding_end'.
... | null | null | null |
@Override
public void onResult (TdApi.Object object) {
switch (object.getConstructor()) {
case TdApi.WebPageInstantView.CONSTRUCTOR: {
final TdApi.WebPageInstantView instantView = (TdApi.WebPageInstantView) object;
tdlib.ui().post(() -> {
if (!isDestroyed()) {
if (!TD.h... | @Override
public void onResult (TdApi.Object object) {
switch (object.getConstructor()) {
case TdApi.WebPageInstantView.CONSTRUCTOR: {
final TdApi.WebPageInstantView instantView = (TdApi.WebPageInstantView) object;
tdlib.ui().post(() -> {
if (!isDestroyed()) {
if (!TD.h... | null | null | null | https://github.com/TGX-Android/Telegram-X/commit/8ad3464d3251418552c1df418089128b3d5c91e4 | Fixed crash when unsupported `PageBlock` is returned in `GetWebPageInstantView` only with `forceFull == true` | app/src/main/java/org/thunderdog/challegram/ui/InstantViewController.java | java | 2022-10-24T21:06:46Z |
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
binding = FragmentAppListBinding.inflate(getLayoutInflater(), container, false);
binding.appBar.setRaised(true);
String title;
if (... | @Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
binding = FragmentAppListBinding.inflate(getLayoutInflater(), container, false);
if (module == null) {
return binding.getRoot();
... | null | null | null | https://github.com/mywalkb/LSPosed_mod/commit/31e4254681aabcbce314bb03c2c802f9085a067f | [app] Fix crash when module not found (#744) | app/src/main/java/org/lsposed/manager/ui/fragment/AppListFragment.java | java | 2021-06-11T15:37:14Z |
static void vnc_dpy_setdata(DisplayChangeListener *dcl,
DisplayState *ds)
{
VncDisplay *vd = ds->opaque;
qemu_pixman_image_unref(vd->guest.fb);
vd->guest.fb = pixman_image_ref(ds->surface->image);
vd->guest.format = ds->surface->format;
vnc_dpy_update(dcl, ds, 0, 0, ds_ge... | static void vnc_dpy_setdata(DisplayChangeListener *dcl,
DisplayState *ds)
{
VncDisplay *vd = container_of(dcl, VncDisplay, dcl);
qemu_pixman_image_unref(vd->guest.fb);
vd->guest.fb = pixman_image_ref(ds->surface->image);
vd->guest.format = ds->surface->format;
vnc_dpy_upd... | null | null | null | qemu/commit/21ef45d71221b4577330fe3aacfb06afad91ad46 | console: kill DisplayState->opaque
It's broken by design. There can be multiple DisplayChangeListener
instances, so they simply can't store state in the (single) DisplayState
struct. Try 'qemu -display gtk -vnc :0', watch it crash & burn.
With DisplayChangeListenerOps having a more sane interface now we can
simply ... | ./qemu/ui/vnc.c | c | 2013-02-28T10:34:31Z |
void SoftAACEncoder2::onQueueFilled(OMX_U32 /* portIndex */) {
if (mSignalledError) {
return;
}
List<BufferInfo *> &inQueue = getPortQueue(0);
List<BufferInfo *> &outQueue = getPortQueue(1);
if (!mSentCodecSpecificData) {
if (outQueue.empty()) {
return;
}
if (AACENC_OK != aacEncEncode(mAACEncoder, NULL, N... | void SoftAACEncoder2::onQueueFilled(OMX_U32 /* portIndex */) {
if (mSignalledError) {
return;
}
List<BufferInfo *> &inQueue = getPortQueue(0);
List<BufferInfo *> &outQueue = getPortQueue(1);
if (!mSentCodecSpecificData) {
if (outQueue.empty()) {
return;
}
if (AACENC_OK != aacEncEncode(mAACEncoder, NULL, N... | CVE-2017-0594 | CWE-120 | An elevation of privilege vulnerability in codecs/aacenc/SoftAACEncoder2.cpp in libstagefright in Mediaserver could enable a local malicious application to execute arbitrary code within the context of a privileged process. This issue is rated as High because it could be used to gain local access to elevated capabilitie... | https://android.googlesource.com/platform/frameworks/av/+/594bf934384920618d2b6ce0bcda1f60144cb3eb | Add bounds check in SoftAACEncoder2::onQueueFilled()
Original code blindly copied some header information into the
user-supplied buffer without checking for sufficient space.
The code does check when it gets to filling the data -- it's
just the header copies that weren't checked.
Bug: 34617444
Test: ran POC before/af... | media/libstagefright/codecs/aacenc/SoftAACEncoder2.cpp | cpp | null |
static int iec61883_read_header(AVFormatContext *context)
{
struct iec61883_data *dv = context->priv_data;
struct raw1394_portinfo pinf[16];
rom1394_directory rom_dir;
char *endptr;
int inport;
int nb_ports;
int port = -1;
int response;
int i, j = 0;
uint64_t guid = 0;
dv->in... | static int iec61883_read_header(AVFormatContext *context)
{
struct iec61883_data *dv = context->priv_data;
struct raw1394_portinfo pinf[16];
rom1394_directory rom_dir;
char *endptr;
int inport;
int nb_ports;
int port = -1;
int response;
int i, j = 0;
uint64_t guid = 0;
dv->in... | null | null | null | FFmpeg/commit/7c453277a399bc81553c6110efd81a0957117138 | avdevice/iec61883: Check pthread init for failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> | ./ffmpeg/libavdevice/iec61883.c | c | 2015-06-07T16:57:55Z |
dfaanalyze (struct dfa *d, int searchflag)
{
int *nullable; /* Nullable stack. */
int *nfirstpos; /* Element count stack for firstpos sets. */
position *firstpos; /* Array where firstpos elements are stored. */
int *nlastpos; /* Element count stack for lastpos sets. */
position *lastpos; /* Array where l... | dfaanalyze (struct dfa *d, int searchflag)
{
int *nullable; /* Nullable stack. */
size_t *nfirstpos; /* Element count stack for firstpos sets. */
position *firstpos; /* Array where firstpos elements are stored. */
size_t *nlastpos; /* Element count stack for lastpos sets. */
position *lastpos; /* Array w... | CVE-2012-5667 | CWE-189 | Multiple integer overflows in GNU Grep before 2.11 might allow context-dependent attackers to execute arbitrary code via vectors involving a long input line that triggers a heap-based buffer overflow. | http://git.savannah.gnu.org/cgit/grep.git/commit/?id=cbbc1a45b9f843c811905c97c90a5d31f8e6c189 | grep: fix some core dumps with long lines etc.
These problems mostly occur because the code attempts to stuff
sizes into int or into unsigned int; this doesn't work on most
64-bit hosts and the errors can lead to core dumps.
* NEWS: Document this.
* src/dfa.c (token): Typedef to ptrdiff_t, since the enum's
range could... | null | null | null |
private static String getCurrentWorldOrServerName() {
IntegratedServer integratedServer = client.getServer();
if (integratedServer != null) {
return integratedServer.getSaveProperties().getLevelName();
}
ServerInfo serverInfo = client.getCurrentServerEntry();
if (ser... | private static String getCurrentWorldOrServerName() {
IntegratedServer integratedServer = client.getServer();
if (integratedServer != null) {
return integratedServer.getSaveProperties().getLevelName();
}
ServerInfo serverInfo = client.getCurrentServerEntry();
if (ser... | null | null | null | https://github.com/Johni0702/bobby/commit/08acba7fc0ab36bab7cf5f3f18e36c17ccee35f7 | Fix crash when connecting to server with port on Windows (fixes #5)
Turns out `:` is an invalid character for file names on Windows. Easy fix is to
just replace it with an underscore. | src/main/java/de/johni0702/minecraft/bobby/FakeChunkManager.java | java | 2021-03-06T19:20:42Z |
int ff_rv34_decode_init_thread_copy(AVCodecContext *avctx)
{
int err;
RV34DecContext *r = avctx->priv_data;
r->s.avctx = avctx;
if (avctx->internal->is_copy) {
r->tmp_b_block_base = NULL;
if ((err = ff_MPV_common_init(&r->s)) < 0)
return err;
if ((err = rv34_decoder_a... | int ff_rv34_decode_init_thread_copy(AVCodecContext *avctx)
{
int err;
RV34DecContext *r = avctx->priv_data;
r->s.avctx = avctx;
if (avctx->internal->is_copy) {
r->tmp_b_block_base = NULL;
if ((err = ff_MPV_common_init(&r->s)) < 0)
return err;
if ((err = rv34_decoder_a... | null | null | null | FFmpeg/commit/fdbd924b84e85ac5c80f01ee059ed5c81d3cc205 | rv34: Fix a memory leak on errors
Signed-off-by: Martin Storsjö <martin@martin.st> | ./ffmpeg/libavcodec/rv34.c | c | 2013-09-16T13:05:18Z |
error::Error GLES2DecoderImpl::HandleGetMultipleIntegervCHROMIUM(
uint32 immediate_data_size, const gles2::GetMultipleIntegervCHROMIUM& c) {
GLuint count = c.count;
uint32 pnames_size;
if (!SafeMultiplyUint32(count, sizeof(GLenum), &pnames_size)) {
return error::kOutOfBounds;
}
const GLenum* pnames = ... | error::Error GLES2DecoderImpl::HandleGetMultipleIntegervCHROMIUM(
uint32 immediate_data_size, const gles2::GetMultipleIntegervCHROMIUM& c) {
GLuint count = c.count;
uint32 pnames_size;
if (!SafeMultiplyUint32(count, sizeof(GLenum), &pnames_size)) {
return error::kOutOfBounds;
}
const GLenum* pnames = ... | CVE-2012-2896 | CWE-189 | Integer overflow in the WebGL implementation in Google Chrome before 22.0.1229.79 on Mac OS X allows remote attackers to cause a denial of service or possibly have unspecified other impact via unknown vectors. | https://github.com/chromium/chromium/commit/3aad1a37affb1ab70d1897f2b03eb8c077264984 | Fix SafeAdd and SafeMultiply
BUG=145648,145544
Review URL: https://chromiumcodereview.appspot.com/10916165
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155478 0039d316-1c4b-4281-b951-d872f2087c98 | gpu/command_buffer/service/gles2_cmd_decoder.cc | cc | 2012-09-07T20:54:47Z |
static SDL_Surface* Create_Surface_Shaded(int width, int height, SDL_Color fg, SDL_Color bg, Uint32 *color)
{
const int alignment = Get_Alignement() - 1;
SDL_Surface *textbuf;
Sint64 size;
Uint8 bg_alpha = bg.a;
/* Create a surface with memory:
* - pitch is rounded to alignment
* - adress... | static SDL_Surface* Create_Surface_Shaded(int width, int height, SDL_Color fg, SDL_Color bg, Uint32 *color)
{
const int alignment = Get_Alignement() - 1;
SDL_Surface *textbuf;
Sint64 size;
Uint8 bg_alpha = bg.a;
/* Create a surface with memory:
* - pitch is rounded to alignment
* - adress... | CVE-2022-27470 | CWE-787 | SDL_ttf v2.0.18 and below was discovered to contain an arbitrary memory write via the function TTF_RenderText_Solid(). This vulnerability is triggered via a crafted TTF file. | https://github.com/libsdl-org/SDL_ttf/commit/db1b41ab8bde6723c24b866e466cad78c2fa0448 | More integer overflow (see bug #187)
Make sure that 'width + alignment' doesn't overflow, otherwise
it could create a SDL_Surface of 'width' but with wrong 'pitch' | SDL_ttf.c | c | 2022-05-04T03:15:00Z |
private void playerLeftParty(PlayerLeftPartyTeamEvent event) {
if (event.getTeamDeleted()) {
// last player leaving the party; transfer any claims the party had back to that player, if possible
FTBChunksTeamData ownerData = FTBChunksAPI.getManager().getData(event.getPlayer());
FTBChunksTeamData deletedData =... | private void playerLeftParty(PlayerLeftPartyTeamEvent event) {
FTBChunksTeamData partyData = FTBChunksAPI.getManager().getData(event.getTeam());
FTBChunksTeamData playerData = FTBChunksAPI.getManager().getData(event.getPlayer());
if (event.getTeamDeleted()) {
// last player leaving the party; transfer any re... | null | null | null | https://github.com/FTBTeam/FTB-Chunks/commit/ad275524ddb57eb2ada6349b039cc905462b589d | fix: remember player's original claims when they join a party
Transfer those claims back to the player when they leave the party;
prevents claim stealing by maliciously inviting and kicking a player
https://github.com/FTBTeam/FTB-Mods-Issues/issues/4 | common/src/main/java/dev/ftb/mods/ftbchunks/FTBChunks.java | java | 2022-11-14T11:39:01Z |
public function delete()
{
return $this->filesystem->deleteDir($this->path);
} | public static function delete($id)
{
$id = sprintf('%d', $id);
$parent = self::getParent($id);
$sql = array(
'table' => 'cat',
'where' => array(
'id' => $id,
),
);
... | CVE-2016-10096 | CWE-89 | SQL injection vulnerability in register.php in GeniXCMS before 1.0.0 allows remote attackers to execute arbitrary SQL commands via the activation parameter. | https://github.com/semplon/GeniXCMS/commit/d885eb20006099262c0278932b9f8aca3c1ac97f | Major Update for Version 1.0.0 release | viewbutton.js | js | 2017-01-01T19:59:00Z |
static void ffserver_apply_stream_config(AVCodecContext *enc, const AVDictionary *conf, AVDictionary **opts)
{
AVDictionaryEntry *e;
if ((e = av_dict_get(conf, "VideoBitRateRangeMin", NULL, 0)))
ffserver_set_int_param(&enc->rc_min_rate, e->value, 1000, INT_MIN,
INT_MAX, NULL, 0... | static void ffserver_apply_stream_config(AVCodecContext *enc, const AVDictionary *conf, AVDictionary **opts)
{
AVDictionaryEntry *e;
if ((e = av_dict_get(conf, "VideoBitRateRangeMin", NULL, 0)))
ffserver_set_int_param(&enc->rc_min_rate, e->value, 1000, INT_MIN,
INT_MAX, NULL, 0... | null | null | null | FFmpeg/commit/3f07dd6e392bf35a478203dc60fcbd36dfdd42aa | ffserver_config: fix possible crash
Fixes CID #1254662
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com> | ./ffmpeg/ffserver_config.c | c | 2014-11-16T01:15:58Z |
static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
KmvcContext *const ctx = avctx->priv_data;
uint8_t *out, *src;
int i;
int header;
int blocksize;
const uint8_t *pal = av_packet_get... | static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPacket *avpkt)
{
KmvcContext *const ctx = avctx->priv_data;
uint8_t *out, *src;
int i;
int header;
int blocksize;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL);
bytestream2_init(&ct... | null | null | null | FFmpeg/commit/da2e774fd6841da7cede8c8ef30337449329727c | kmvc: Use bytestream2 functions to prevent buffer overreads.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> | ./ffmpeg/libavcodec/kmvc.c | c | 2012-01-10T01:21:17Z |
static int
ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
ext4_lblk_t iblock, unsigned int max_blocks,
struct ext4_ext_path *path, int flags,
unsigned int allocated, struct buffer_head *bh_result,
ext4_fsblk_t newblock)
{
int ret = 0;
int err = 0;
ext4_io_end_t *io = EXT4_I(... | static int
ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
ext4_lblk_t iblock, unsigned int max_blocks,
struct ext4_ext_path *path, int flags,
unsigned int allocated, struct buffer_head *bh_result,
ext4_fsblk_t newblock)
{
int ret = 0;
int err = 0;
ext4_io_end_t *io = EXT4_I(... | null | null | null | https://github.com/torvalds/linux/commit/744692dc059845b2a3022119871846e74d4f6e11 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... | fs/ext4/extents.c | c | 2010-03-04T21:14:02Z |
static BCPos debug_framepc(lua_State *L, GCfunc *fn, cTValue *nextframe)
{
const BCIns *ins;
GCproto *pt;
BCPos pos;
lua_assert(fn->c.gct == ~LJ_TFUNC || fn->c.gct == ~LJ_TTHREAD);
if (!isluafunc(fn)) { /* Cannot derive a PC for non-Lua functions. */
return NO_BCPOS;
} else if (nextframe == NULL) { /*... | static BCPos debug_framepc(lua_State *L, GCfunc *fn, cTValue *nextframe)
{
const BCIns *ins;
GCproto *pt;
BCPos pos;
lua_assert(fn->c.gct == ~LJ_TFUNC || fn->c.gct == ~LJ_TTHREAD);
if (!isluafunc(fn)) { /* Cannot derive a PC for non-Lua functions. */
return NO_BCPOS;
} else if (nextframe == NULL) { /*... | CVE-2020-24372 | CWE-125 | LuaJIT through 2.1.0-beta3 has an out-of-bounds read in lj_err_run in lj_err.c. | https://github.com/LuaJIT/LuaJIT/commit/e296f56b825c688c3530a981dc6b495d972f3d01 | Call error function on rethrow after trace exit. | null | null | 2020-08-09T20:50:31Z |
check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e,
struct xt_table_info *newinfo,
unsigned int *size,
const unsigned char *base,
const unsigned char *limit,
const unsigned int *hook_entries,
const unsigned int *underflows,
const char *name)
{
struct xt_entry_match ... | check_compat_entry_size_and_hooks(struct compat_ip6t_entry *e,
struct xt_table_info *newinfo,
unsigned int *size,
const unsigned char *base,
const unsigned char *limit,
const unsigned int *hook_entries,
const unsigned int *underflows,
const char *name)
{
struct xt_entry_match ... | CVE-2016-4998 | CWE-119 | The IPT_SO_SET_REPLACE setsockopt implementation in the netfilter subsystem in the Linux kernel before 4.6 allows local users to cause a denial of service (out-of-bounds read) or possibly obtain sensitive information from kernel heap memory by leveraging in-container root access to provide a crafted offset value that l... | https://github.com/torvalds/linux/commit/6e94e0cfb0887e4013b3b930fa6ab1fe6bb6ba91 | netfilter: x_tables: make sure e->next_offset covers remaining blob size
Otherwise this function may read data beyond the ruleset blob.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ip6_tables.c | c | 2016-03-22T17:02:50Z |
@site.route('/lost_found', methods=['GET', 'POST'])
def PropertyPage():
if request.method == "POST":
formtype = request.form['form-name']
if formtype == "LostSomething":
lostdesc = request.form['LostSomethingDescription']
lostlocation = request.form['LostSomethingPossibleLoca... | @site.route('/lost_found', methods=['GET', 'POST'])
def PropertyPage():
if request.method == "POST":
formtype = request.form['form-name']
if formtype == "LostSomething":
lostdesc = request.form['LostSomethingDescription']
lostlocation = request.form['LostSomethingPossibleLoca... | null | cwe-089 | null | github.com/itucsdb1705/itucsdb1705/commit/311d8c9a66d365be94a1d906bc68f3d4ad29ea4b | prevented sql injection
edited handlers.py to prevent sql injection | handlers.py | py | 2017-10-18T10:49:10Z |
private static void printNodeAST(LineWriter writer, NodeInterface node, String fieldName, int level) {
if (node == null) {
return;
}
writer.writeLineFormat("%s%s = %s", " ".repeat(level), fieldName, node);
for (Class<?> c = node.getClass(); c != Object.class; c = c.getSupe... | private static void printNodeAST(LineWriter writer, NodeInterface node, String fieldName, int level) {
if (node == null) {
return;
}
writer.writeLineFormat("%s%s = %s", " ".repeat(level), fieldName, node);
for (Class<?> c = node.getClass(); c != Object.class; c = c.getSupe... | null | null | null | https://github.com/oracle/graal/commit/47b483e1a85b00600e0b9a2c2e6c0caf0b1ec366 | Fix stack overflow in LLVM node utils | sulong/projects/com.oracle.truffle.llvm.runtime/src/com/oracle/truffle/llvm/runtime/LLVMNodeUtils.java | java | 2022-10-13T07:52:31Z |
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
// 开启 Xss 过滤状态
XssStateHolder.open();
try {
filterChain.doFilter(new XssRequestWrapper(request), response);
}
finally {
// 必须删除 ThreadLo... | @Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
// 开启 Xss 过滤状态
XssStateHolder.open();
try {
filterChain.doFilter(new XssRequestWrapper(request, xssCleaner), response);
}
finally {
// 必... | null | null | null | https://github.com/ballcat-projects/ballcat/commit/2519b52a6e4a70b9d85ae2017e42b738ef5cce85 | :zap: 抽象出 XssCleaner 角色,用于控制 Xss 文本的清除行为 | ballcat-starters/ballcat-spring-boot-starter-xss/src/main/java/com/hccake/ballcat/common/xss/core/XssFilter.java | java | 2021-08-27T13:30:56Z |
ssize_t __weak cpu_show_l1tf(struct device *dev,
struct device_attribute *attr, char *buf)
{
return sprintf(buf, "Not affected\n");
} | ssize_t __weak cpu_show_l1tf(struct device *dev,
struct device_attribute *attr, char *buf)
{
return sysfs_emit(buf, "Not affected\n");
} | null | CWE-787 | null | https://github.com/torvalds/linux/commit/aa838896d87af561a33ecefea1caa4c15a68bc47 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... | null | null | 2020-09-16T20:40:39Z |
function form_confirm_buttons($action_url, $cancel_url) {
global $config;
?>
<tr>
<td align='right'>
<input type='button' onClick='cactiReturnTo("<?php print htmlspecialchars($config['url_path'] . $cancel_url);?>")' value='<?php print __esc('Cancel');?>'>
<input type='button' onClick='cactiReturnTo("<?php pr... | function form_confirm_buttons($action_url, $cancel_url) {
global $config;
?>
<tr>
<td align='right'>
<input type='button' onClick='cactiReturnTo("<?php print htmlspecialchars($config['url_path'] . $cancel_url, ENT_QUOTES);?>")' value='<?php print __esc('Cancel');?>'>
<input type='button' onClick='cactiReturn... | CVE-2017-12065 | NVD-CWE-noinfo | spikekill.php in Cacti before 1.1.16 might allow remote attackers to execute arbitrary code via the avgnan, outlier-start, or outlier-end parameter. | https://github.com/Cacti/cacti/commit/bd0e586f6f46d814930226f1516a194e7e72293e | Resolving Issue #877
Improving resolution to #847 and one additional vulnerability. | html_form.php | php | 2017-08-01T05:29:00Z |
int udhcpd_main(int argc UNUSED_PARAM, char **argv)
{
int server_socket = -1, retval;
uint8_t *state;
unsigned timeout_end;
unsigned num_ips;
unsigned opt;
struct option_set *option;
char *str_I = str_I;
const char *str_a = "2000";
unsigned arpping_ms;
IF_FEATURE_UDHCP_PORT(char *str_P;)
setup_common_bufsiz... | int udhcpd_main(int argc UNUSED_PARAM, char **argv)
{
int server_socket = -1, retval;
uint8_t *state;
unsigned timeout_end;
unsigned num_ips;
unsigned opt;
struct option_set *option;
char *str_I = str_I;
const char *str_a = "2000";
unsigned arpping_ms;
IF_FEATURE_UDHCP_PORT(char *str_P;)
setup_common_bufsiz... | CVE-2018-20679 | CWE-125 | An issue was discovered in BusyBox before 1.30.0. An out of bounds read in udhcp components (consumed by the DHCP server, client, and relay) allows a remote attacker to leak sensitive information from the stack by sending a crafted DHCP message. This is related to verification in udhcp_get_option() in networking/udhcp/... | https://git.busybox.net/busybox/commit/?id=6d3b4bb24da9a07c263f3c1acf8df85382ff562c | udhcpc: check that 4-byte options are indeed 4-byte, closes 11506
function old new delta
udhcp_get_option32 - 27 +27
udhcp_get_option 231 248 +17
----------------------------------... | null | null | null |
static int decode_rle(AVCodecContext *avctx, AVFrame *p, GetByteContext *gbc,
int step)
{
int i, j;
int offset = avctx->width * step;
uint8_t *outdata = p->data[0];
for (i = 0; i < avctx->height; i++) {
int size, left, code, pix;
uint8_t *out = outdata;
int ... | static int decode_rle(AVCodecContext *avctx, AVFrame *p, GetByteContext *gbc,
int step)
{
int i, j;
int offset = avctx->width * step;
uint8_t *outdata = p->data[0];
for (i = 0; i < avctx->height; i++) {
int size, left, code, pix;
uint8_t *out = outdata;
int ... | null | null | null | FFmpeg/commit/1eda55510ae5d15ce3df9f496002508580899045 | lavc/qdrw: Fix overwrite when reading invalid Quickdraw images. | ./ffmpeg/libavcodec/qdrw.c | c | 2015-05-16T20:51:16Z |
public static void handleRecipe(IRecipeHandler recipe, int index, List<Object[]> inputs, List<Object[]> outputs) {
// raw inputs
recipe.getIngredientStacks(index)
.stream()
.map((positionedStack) -> (Object[]) positionedStack.items)
.forEach(inputs::add);
... | public static void handleRecipe(IRecipeHandler recipe, int index, List<Object[]> inputs, List<Object[]> outputs) {
// raw inputs
recipe.getIngredientStacks(index)
.stream()
.map((positionedStack) -> (Object[]) positionedStack.items)
.forEach(inputs::add);
... | null | null | null | https://github.com/Towdium/JustEnoughCalculation/commit/903743d0a3e350ddc45732851b4c9ecabe5d1e36 | Fix crash when transferring recipe | src/main/java/me/towdium/jecalculation/nei/Adapter.java | java | 2022-11-18T09:04:41Z |
exo_open_launch_desktop_file (const gchar *arg)
{
#ifdef HAVE_GIO_UNIX
GFile *gfile;
gchar *contents;
gsize length;
gboolean result;
GKeyFile *key_file;
GDesktopAppInfo *appinfo;
/* try to open a file from the arguments */
gfile = g_file_new_for_commandline... | exo_open_launch_desktop_file (const gchar *arg)
{
#ifdef HAVE_GIO_UNIX
GFile *gfile;
gchar *contents;
gsize length;
gboolean result;
GKeyFile *key_file;
GDesktopAppInfo *appinfo;
/* try to open a file from the arguments */
gfile = g_file_new_for_commandline... | null | CWE-94 | null | https://github.com/xfce-mirror/exo/commit/c71c04ff5882b2866a0d8506fb460d4ef796de9f | exo-open : Only execute local .desktop files
Issue #85 (Backported cc047717)
CVE-2022-32278
This patch prevents executing possibly malicious .desktop files
from online sources (ftp://, http:// etc.).
Original patch authored by Alexander Schwinn <alexxcons@xfce.org> | null | null | 2022-06-06T14:57:03Z |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.