code
stringlengths
14
2.05k
label
int64
0
1
programming_language
stringclasses
7 values
cwe_id
stringlengths
6
14
cwe_name
stringlengths
5
98
description
stringlengths
36
379
url
stringlengths
36
48
label_name
stringclasses
2 values
_id: new ObjectId(), workspaceId: ctx.auth.workspaceId, name: input.name, description: input.description, permissions: input.permissions }; await rolesCollection.insertOne(role); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "create", d...
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
_id: new ObjectId(input.id), workspaceId: ctx.auth.workspaceId }, { $set: { name: input.name, description: input.description, permissions: input.permissions } } ); updateSessionRole(ctx, input.id); publ...
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
_id: new ObjectId(input.id), workspaceId: ctx.auth.workspaceId }, { $set: { name: input.name, description: input.description, permissions: input.permissions } } ); updateSessionRole(ctx, input.id); publ...
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
_id: new ObjectId(input.id), workspaceId: ctx.auth.workspaceId }, { $set: { name: input.name, description: input.description, permissions: input.permissions } } ); updateSessionRole(ctx, input.id); publ...
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
_id: new ObjectId(id) }, { $set: tagUpdate } ); if (!matchedCount) throw errors.notFound("tag"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "update", data: input }); }),
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
_id: new ObjectId(id) }, { $set: tagUpdate } ); if (!matchedCount) throw errors.notFound("tag"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "update", data: input }); }),
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
_id: new ObjectId(id) }, { $set: tagUpdate } ); if (!matchedCount) throw errors.notFound("tag"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "update", data: input }); }),
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
value: (input.label || "").toLowerCase().replace(/\s/g, "_") }; await tagsCollection.insertOne(tag); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "create", data: { ...input, id: `${tag._id}` } }); return { id: `${tag._id}` }; ...
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
value: (input.label || "").toLowerCase().replace(/\s/g, "_") }; await tagsCollection.insertOne(tag); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "create", data: { ...input, id: `${tag._id}` } }); return { id: `${tag._id}` }; ...
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
value: (input.label || "").toLowerCase().replace(/\s/g, "_") }; await tagsCollection.insertOne(tag); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "create", data: { ...input, id: `${tag._id}` } }); return { id: `${tag._id}` }; ...
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
_id: new ObjectId(id), workspaceId: ctx.auth.workspaceId }, { $set: update } ); if (matchedCount === 0) throw errors.notFound("token"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "update", data: { id, ...
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
_id: new ObjectId(id), workspaceId: ctx.auth.workspaceId }, { $set: update } ); if (matchedCount === 0) throw errors.notFound("token"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "update", data: { id, ...
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
_id: new ObjectId(id), workspaceId: ctx.auth.workspaceId }, { $set: update } ); if (matchedCount === 0) throw errors.notFound("token"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "update", data: { id, ...
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
const { deletedCount } = await tokensCollection.deleteOne({ _id: new ObjectId(input.id) }); if (deletedCount === 0) throw errors.notFound("token"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "delete", data: { id: input.id } }); }),
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
const { deletedCount } = await tokensCollection.deleteOne({ _id: new ObjectId(input.id) }); if (deletedCount === 0) throw errors.notFound("token"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "delete", data: { id: input.id } }); }),
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
const { deletedCount } = await tokensCollection.deleteOne({ _id: new ObjectId(input.id) }); if (deletedCount === 0) throw errors.notFound("token"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "delete", data: { id: input.id } }); }),
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
_id: new ObjectId(), workspaceId: ctx.auth.workspaceId, ...input }; await transformersCollection.insertOne(transformer); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "create", data: { ...input, id: `${transformer._id}` } }); return { id: ...
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
_id: new ObjectId(), workspaceId: ctx.auth.workspaceId, ...input }; await transformersCollection.insertOne(transformer); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "create", data: { ...input, id: `${transformer._id}` } }); return { id: ...
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
_id: new ObjectId(), workspaceId: ctx.auth.workspaceId, ...input }; await transformersCollection.insertOne(transformer); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "create", data: { ...input, id: `${transformer._id}` } }); return { id: ...
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
_id: new ObjectId(input.id), workspaceId: ctx.auth.workspaceId }); if (!deletedCount) throw errors.notFound("transformer"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "delete", data: input }); }),
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
_id: new ObjectId(input.id), workspaceId: ctx.auth.workspaceId }); if (!deletedCount) throw errors.notFound("transformer"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "delete", data: input }); }),
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
_id: new ObjectId(input.id), workspaceId: ctx.auth.workspaceId }); if (!deletedCount) throw errors.notFound("transformer"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "delete", data: input }); }),
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
{ _id: new ObjectId(id), workspaceId: ctx.auth.workspaceId }, { $set: update } ); if (!matchedCount) throw errors.notFound("variant"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "update", data: input }); }),
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
{ _id: new ObjectId(id), workspaceId: ctx.auth.workspaceId }, { $set: update } ); if (!matchedCount) throw errors.notFound("variant"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "update", data: input }); }),
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
{ _id: new ObjectId(id), workspaceId: ctx.auth.workspaceId }, { $set: update } ); if (!matchedCount) throw errors.notFound("variant"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "update", data: input }); }),
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
_id: new ObjectId(), workspaceId: ctx.auth.workspaceId, ...input }; await variantsCollection.insertOne(variant); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "create", data: { ...input, id: `${variant._id}` } }); return { id: `${variant._...
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
_id: new ObjectId(), workspaceId: ctx.auth.workspaceId, ...input }; await variantsCollection.insertOne(variant); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "create", data: { ...input, id: `${variant._id}` } }); return { id: `${variant._...
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
_id: new ObjectId(), workspaceId: ctx.auth.workspaceId, ...input }; await variantsCollection.insertOne(variant); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "create", data: { ...input, id: `${variant._id}` } }); return { id: `${variant._...
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
_id: new ObjectId(), userId: user._id, codeEditorTheme: "dark", uiTheme: "auto", accentColor: "energy", currentWorkspaceId: workspaceId }); await createSession(ctx, `${user._id}`); } catch (error) { // eslint-disable-next-line no-...
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
_id: new ObjectId(), userId: user._id, codeEditorTheme: "dark", uiTheme: "auto", accentColor: "energy", currentWorkspaceId: workspaceId }); await createSession(ctx, `${user._id}`); } catch (error) { // eslint-disable-next-line no-...
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
_id: new ObjectId(), userId: user._id, codeEditorTheme: "dark", uiTheme: "auto", accentColor: "energy", currentWorkspaceId: workspaceId }); await createSession(ctx, `${user._id}`); } catch (error) { // eslint-disable-next-line no-...
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
_id: new ObjectId(input.id), workspaceId: ctx.auth.workspaceId }); if (!deletedCount) throw errors.notFound("webhook"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "delete", data: input }); })
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
_id: new ObjectId(input.id), workspaceId: ctx.auth.workspaceId }); if (!deletedCount) throw errors.notFound("webhook"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "delete", data: input }); })
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
_id: new ObjectId(input.id), workspaceId: ctx.auth.workspaceId }); if (!deletedCount) throw errors.notFound("webhook"); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "delete", data: input }); })
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
roleId: new ObjectId(input.roleId) } } ); await updateSessionUser(ctx, `${membership.userId}`); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "update", data: { id: input.id, userId: `${membership.userId}`, roleId: `${...
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
roleId: new ObjectId(input.roleId) } } ); await updateSessionUser(ctx, `${membership.userId}`); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "update", data: { id: input.id, userId: `${membership.userId}`, roleId: `${...
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
roleId: new ObjectId(input.roleId) } } ); await updateSessionUser(ctx, `${membership.userId}`); publishEvent(ctx, `${ctx.auth.workspaceId}`, { action: "update", data: { id: input.id, userId: `${membership.userId}`, roleId: `${...
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
wrappers: (workspaceSettings.wrappers || []).map((item, index) => { if (index === sameKeyWrapperIndex) { return { ...item, ...input, ...(extensionId && { extension: item.extension || true }) }; ...
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
wrappers: (workspaceSettings.wrappers || []).map((item, index) => { if (index === sameKeyWrapperIndex) { return { ...item, ...input, ...(extensionId && { extension: item.extension || true }) }; ...
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
wrappers: (workspaceSettings.wrappers || []).map((item, index) => { if (index === sameKeyWrapperIndex) { return { ...item, ...input, ...(extensionId && { extension: item.extension || true }) }; ...
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
...(extensionId && { extension: item.extension || true }) }; } return item; })
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
...(extensionId && { extension: item.extension || true }) }; } return item; })
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
...(extensionId && { extension: item.extension || true }) }; } return item; })
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
schema: zodToJsonSchema(envSchema.extend(envSchemaExtension || {})) })
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
schema: zodToJsonSchema(envSchema.extend(envSchemaExtension || {})) })
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
schema: zodToJsonSchema(envSchema.extend(envSchemaExtension || {})) })
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
renderHTML({ node, HTMLAttributes }) { return [ "pre", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), [ "code", { class: node.attrs.lang ? `language-${node.attrs.lang}` : null }, 0 ] ]; },
0
TypeScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
renderHTML({ node, HTMLAttributes }) { return [ "pre", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), [ "code", { class: node.attrs.lang ? `language-${node.attrs.lang}` : null }, 0 ] ]; },
0
TypeScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
renderHTML({ node, HTMLAttributes }) { return [ "pre", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), [ "code", { class: node.attrs.lang ? `language-${node.attrs.lang}` : null }, 0 ] ]; },
0
TypeScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
constructor( tracker: IWidgetTracker<MarkdownDocument>, protected parser: IMarkdownParser | null ) { super(tracker); }
0
TypeScript
NVD-CWE-noinfo
null
null
null
vulnerable
const onHeadingsChanged = () => { if (!this.parser) { return; } // Clear all numbering items TableOfContentsUtils.clearNumbering(widget.content.node); // Create a new mapping headingToElement = new WeakMap<IMarkdownViewerHeading, Element | null>(); model.headings....
0
TypeScript
NVD-CWE-noinfo
null
null
null
vulnerable
export async function getIdForHeading( heading: INotebookHeading, parser: IRenderMime.IMarkdownParser ) { let elementId: string | null = null; if (heading.type === Cell.HeadingType.Markdown) { elementId = await TableOfContentsUtils.Markdown.getHeadingId( parser, // Type from TableOfContentsUtils...
0
TypeScript
NVD-CWE-noinfo
null
null
null
vulnerable
const findHeadingElement = (cell: Cell): void => { model.getCellHeadings(cell).forEach(async heading => { const elementId = await getIdForHeading(heading, this.parser!); const selector = elementId ? `h${heading.level}[id="${elementId}"]` : `h${heading.level}`; if ...
0
TypeScript
NVD-CWE-noinfo
null
null
null
vulnerable
export async function getHeadingId( parser: IMarkdownParser, raw: string, level: number ): Promise<string | null> { try { const innerHTML = await parser.render(raw); if (!innerHTML) { return null; } const container = document.createElement('div'); container.innerHTML = innerHTML; ...
0
TypeScript
NVD-CWE-noinfo
null
null
null
vulnerable
void context.ready.then(async () => { const file = context.model; const workspace = file.toJSON() as unknown as Workspace.IWorkspace; const path = context.path; const id = workspace.metadata.id; // Save the file contents as a workspace. await this._workspaces.save(...
0
TypeScript
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
vulnerable
void context.ready.then(async () => { const file = context.model; const workspace = file.toJSON() as unknown as Workspace.IWorkspace; const path = context.path; const id = workspace.metadata.id; // Save the file contents as a workspace. await this._workspaces.save(...
0
TypeScript
CWE-23
Relative Path Traversal
The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.
https://cwe.mitre.org/data/definitions/23.html
vulnerable
export function getSessionUrl(baseUrl: string, id: string): string { return URLExt.join(baseUrl, SESSION_SERVICE_URL, id); }
0
TypeScript
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
vulnerable
export function getSessionUrl(baseUrl: string, id: string): string { return URLExt.join(baseUrl, SESSION_SERVICE_URL, id); }
0
TypeScript
CWE-23
Relative Path Traversal
The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.
https://cwe.mitre.org/data/definitions/23.html
vulnerable
export async function requestTranslationsAPI<T>( translationsUrl: string = '', locale = '', init: RequestInit = {}, serverSettings: ServerConnection.ISettings | undefined = undefined ): Promise<T> { // Make request to Jupyter API const settings = serverSettings ?? ServerConnection.makeSettings(); translat...
0
TypeScript
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
vulnerable
export async function requestTranslationsAPI<T>( translationsUrl: string = '', locale = '', init: RequestInit = {}, serverSettings: ServerConnection.ISettings | undefined = undefined ): Promise<T> { // Make request to Jupyter API const settings = serverSettings ?? ServerConnection.makeSettings(); translat...
0
TypeScript
CWE-23
Relative Path Traversal
The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.
https://cwe.mitre.org/data/definitions/23.html
vulnerable
headers: baseHeaders(), }) .then((res) => res.json()) .then((res) => res) .catch((e) => { console.error(e); return { filename: null, error: e.message }; }); },
0
TypeScript
CWE-754
Improper Check for Unusual or Exceptional Conditions
The product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.
https://cwe.mitre.org/data/definitions/754.html
vulnerable
exportImport: () => { return "/settings/export-import"; },
0
TypeScript
CWE-754
Improper Check for Unusual or Exceptional Conditions
The product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.
https://cwe.mitre.org/data/definitions/754.html
vulnerable
exports: () => { return `${API_BASE.replace("/api", "")}/system/data-exports`; },
0
TypeScript
CWE-754
Improper Check for Unusual or Exceptional Conditions
The product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.
https://cwe.mitre.org/data/definitions/754.html
vulnerable
get url() { return `http://${this[incomingKey].headers.host}${this[incomingKey].url}` },
0
TypeScript
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the...
https://cwe.mitre.org/data/definitions/22.html
vulnerable
msg_puts_printf(char_u *str, int maxlen) { char_u *s = str; char_u *buf = NULL; char_u *p = s; #ifdef MSWIN if (!(silent_mode && p_verbose == 0)) mch_settmode(TMODE_COOK); // handle CR and NL correctly #endif while ((maxlen < 0 || (int)(s - str) < maxlen) && *s != NUL) { if (!(silent_mode && ...
1
C
CWE-122
Heap-based Buffer Overflow
A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
https://cwe.mitre.org/data/definitions/122.html
safe
vim_strlen_maxlen(char *s, size_t maxlen) { size_t i; for (i = 0; i < maxlen; ++i) if (s[i] == NUL) break; return i; }
1
C
CWE-122
Heap-based Buffer Overflow
A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
https://cwe.mitre.org/data/definitions/122.html
safe
get_register( int name, int copy) // make a copy, if FALSE make register empty. { yankreg_T *reg; int i; #ifdef FEAT_CLIPBOARD // When Visual area changed, may have to update selection. Obtain the // selection too. if (name == '*' && clip_star.available) { if (clip_isautosel_star()...
1
C
CWE-476
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
https://cwe.mitre.org/data/definitions/476.html
safe
regtilde(char_u *source, int magic) { char_u *newsub = source; char_u *p; for (p = newsub; *p; ++p) { if ((*p == '~' && magic) || (*p == '\\' && *(p + 1) == '~' && !magic)) { if (reg_prev_sub != NULL) { // length = len(newsub) - 1 + len(prev_sub) + 1 // Avoid making the text longer than...
1
C
CWE-190
Integer Overflow or Wraparound
The product performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
https://cwe.mitre.org/data/definitions/190.html
safe
is_qf_win(win_T *win, qf_info_T *qi) { // A window displaying the quickfix buffer will have the w_llist_ref field // set to NULL. // A window displaying a location list buffer will have the w_llist_ref // pointing to the location list. if (buf_valid(win->w_buffer) && bt_quickfix(win->w_buffer)) if ...
1
C
CWE-416
Use After Free
Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code.
https://cwe.mitre.org/data/definitions/416.html
safe
buf_contents_changed(buf_T *buf) { buf_T *newbuf; int differ = TRUE; linenr_T lnum; aco_save_T aco; exarg_T ea; // Allocate a buffer without putting it in the buffer list. newbuf = buflist_new(NULL, NULL, (linenr_T)1, BLN_DUMMY); if (newbuf == NULL) return TRUE; // Force the 'fil...
1
C
CWE-416
Use After Free
Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code.
https://cwe.mitre.org/data/definitions/416.html
safe
get_list_range(char_u **str, int *num1, int *num2) { int len; int first = FALSE; varnumber_T num; *str = skipwhite(*str); if (**str == '-' || vim_isdigit(**str)) // parse "from" part of range { vim_str2nr(*str, NULL, &len, 0, &num, NULL, 0, FALSE, NULL); *str += len; // overflow if (num ...
1
C
CWE-190
Integer Overflow or Wraparound
The product performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
https://cwe.mitre.org/data/definitions/190.html
safe
get_list_range(char_u **str, int *num1, int *num2) { int len; int first = FALSE; varnumber_T num; *str = skipwhite(*str); if (**str == '-' || vim_isdigit(**str)) // parse "from" part of range { vim_str2nr(*str, NULL, &len, 0, &num, NULL, 0, FALSE, NULL); *str += len; // overflow if (num ...
1
C
CWE-416
Use After Free
Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code.
https://cwe.mitre.org/data/definitions/416.html
safe
nv_z_get_count(cmdarg_T *cap, int *nchar_arg) { int nchar = *nchar_arg; long n; // "z123{nchar}": edit the count before obtaining {nchar} if (checkclearop(cap->oap)) return FALSE; n = nchar - '0'; for (;;) { #ifdef USE_ON_FLY_SCROLL dont_scroll = TRUE; // disallow scrolling here #endif...
1
C
CWE-190
Integer Overflow or Wraparound
The product performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
https://cwe.mitre.org/data/definitions/190.html
safe
get_number( int colon, // allow colon to abort int *mouse_used) { int n = 0; int c; int typed = 0; if (mouse_used != NULL) *mouse_used = FALSE; // When not printing messages, the user won't know what to type, return a // zero (as if CR was hit). if (msg_silent != 0) ret...
1
C
CWE-190
Integer Overflow or Wraparound
The product performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
https://cwe.mitre.org/data/definitions/190.html
safe
shift_line( int left, int round, int amount, int call_changed_bytes) // call changed_bytes() { long long count; int i, j; int sw_val = (int)get_sw_value_indent(curbuf); count = (long long)get_indent(); // get current indent if (round) // round off indent { i = count / sw_v...
1
C
CWE-190
Integer Overflow or Wraparound
The product performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
https://cwe.mitre.org/data/definitions/190.html
safe
static bool meta_set(RAnal *a, RAnalMetaType type, int subtype, ut64 from, ut64 to, const char *str) { if (to < from) { return false; } RSpace *space = r_spaces_current (&a->meta_spaces); RIntervalNode *node = find_node_at (a, type, space, from); RAnalMetaItem *item = node ? node->data : R_NEW0 (RAnalMetaItem); ...
1
C
CWE-74
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/74.html
safe
R_API char *r_cons_hud_string(const char *s) { if (!r_cons_is_interactive ()) { R_LOG_ERROR ("Hud mode requires scr.interactive=true"); return NULL; } char *os, *track, *ret, *o = strdup (s); if (!o) { return NULL; } r_str_ansi_strip (o); r_str_replace_ch (o, '\r', 0, true); r_str_replace_ch (o, '\t', 0, ...
1
C
CWE-74
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/74.html
safe
R_API char *r_cons_hud_line_string(const char *s) { if (!r_cons_is_interactive ()) { R_LOG_ERROR ("Hud mode requires scr.interactive=true"); return NULL; } char *os, *track, *ret, *o = strdup (s); if (!o) { return NULL; } r_str_replace_ch (o, '\r', 0, true); r_str_replace_ch (o, '\t', 0, true); r_str_ansi...
1
C
CWE-74
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/74.html
safe
R_API char *r_cons_hud_file(const char *f) { char *s = r_file_slurp (f, NULL); if (s) { r_str_ansi_strip (s); char *ret = r_cons_hud_string (s); free (s); return ret; } return NULL; }
1
C
CWE-74
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/74.html
safe
R_API size_t r_str_ansi_strip(char *str) { size_t i = 0; while (str[i]) { size_t chlen = __str_ansi_length (str + i); if (chlen > 1) { r_str_cpy (str + i, str + i + chlen); } else { i++; } } return i; }
1
C
CWE-74
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/74.html
safe
static RList *patch_relocs(RBin *b) { r_return_val_if_fail (b && b->iob.io && b->iob.io->desc, NULL); RBinObject *bo = r_bin_cur_object (b); RIO *io = b->iob.io; if (!bo || !bo->bin_obj) { return NULL; } struct r_bin_coff_obj *bin = (struct r_bin_coff_obj*)bo->bin_obj; if (bin->hdr.f_flags & COFF_FLAGS_TI_F_EX...
1
C
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
static int getid(char ch) { const char *const keys = "[]<>+-,."; const char *const cidx = strchr (keys, ch); return cidx? cidx - keys + 1: 0; }
1
C
CWE-787
Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.
https://cwe.mitre.org/data/definitions/787.html
safe
static void process_constructors(RKernelCacheObj *obj, struct MACH0_(obj_t) *mach0, RList *ret, ut64 paddr, bool is_first, int mode, const char *prefix) { const RVector *sections = MACH0_(load_sections) (mach0); if (!sections) { return; } int type; struct section_t *section; r_vector_foreach (sections, section)...
1
C
CWE-787
Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.
https://cwe.mitre.org/data/definitions/787.html
safe
Bool gf_sg_proto_field_is_sftime_offset(GF_Node *node, GF_FieldInfo *field) { u32 i; GF_Route *r; GF_ProtoInstance *inst; GF_FieldInfo inf; if (node->sgprivate->tag != TAG_ProtoNode) return 0; if (field->fieldType != GF_SG_VRML_SFTIME) return 0; inst = (GF_ProtoInstance *) node; /*check in interface if this is...
1
C
CWE-121
Stack-based Buffer Overflow
A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function).
https://cwe.mitre.org/data/definitions/121.html
safe
static s32 svc_parse_slice(GF_BitStream *bs, AVCState *avc, AVCSliceInfo *si) { s32 pps_id; /*s->current_picture.reference= h->nal_ref_idc != 0;*/ gf_bs_read_ue_log(bs, "first_mb_in_slice"); si->slice_type = gf_bs_read_ue_log(bs, "slice_type"); if (si->slice_type > 9) return -1; pps_id = gf_bs_read_ue_log(bs, "...
1
C
CWE-120
Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow.
https://cwe.mitre.org/data/definitions/120.html
safe
GF_Err Q_DecCoordOnUnitSphere(GF_BifsDecoder *codec, GF_BitStream *bs, u32 NbBits, u32 NbComp, Fixed *m_ft) { u32 i, orient, sign; s32 value; Fixed tang[4], delta; s32 dir; if (NbBits>32) return GF_NON_COMPLIANT_BITSTREAM; if (NbComp != 2 && NbComp != 3) return GF_BAD_PARAM; //only 2 or 3 comp in the quantized ...
1
C
CWE-190
Integer Overflow or Wraparound
The product performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
https://cwe.mitre.org/data/definitions/190.html
safe
GF_Err dac3_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_AC3ConfigBox *ptr = (GF_AC3ConfigBox *)s; if (ptr->cfg.is_ec3) s->type = GF_ISOM_BOX_TYPE_DEC3; e = gf_isom_box_write_header(s, bs); if (ptr->cfg.is_ec3) s->type = GF_ISOM_BOX_TYPE_DAC3; if (e) return e; e = gf_odf_ac3_cfg_write_bs(&ptr->cfg, bs...
1
C
CWE-122
Heap-based Buffer Overflow
A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
https://cwe.mitre.org/data/definitions/122.html
safe
GF_Err video_sample_entry_box_size(GF_Box *s) { GF_Box *b; u32 pos=0; GF_MPEGVisualSampleEntryBox *ptr = (GF_MPEGVisualSampleEntryBox *)s; gf_isom_video_sample_entry_size((GF_VisualSampleEntryBox *)s); /*make sure we write the config box first, we don't care about the rest*/ /*mp4v*/ gf_isom_check_position(s, ...
1
C
CWE-122
Heap-based Buffer Overflow
A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
https://cwe.mitre.org/data/definitions/122.html
safe
void gf_isom_check_position(GF_Box *s, GF_Box *child, u32 *pos) { if (!s || !s->child_boxes || !child || !pos) return; if (s->internal_flags & GF_ISOM_ORDER_FREEZE) return; s32 cur_pos = gf_list_find(s->child_boxes, child); //happens when partially cloning boxes if (cur_pos < 0) return; if (cur_pos != (s32)...
1
C
CWE-122
Heap-based Buffer Overflow
A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
https://cwe.mitre.org/data/definitions/122.html
safe
GF_EXPORT GF_Err gf_isom_box_write(GF_Box *a, GF_BitStream *bs) { GF_Err e; u64 pos = gf_bs_get_position(bs); if (!a) return GF_BAD_PARAM; //box has been disabled, do not write if (!a->size) return GF_OK; if (a->registry->disabled) { GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[iso file] Box %s disabled registry,...
1
C
CWE-122
Heap-based Buffer Overflow
A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
https://cwe.mitre.org/data/definitions/122.html
safe
const u32 *gf_isom_get_track_switch_parameter(GF_ISOFile *movie, u32 trackNumber, u32 group_index, u32 *switchGroupID, u32 *criteriaListSize) { GF_TrackBox *trak; GF_UserDataMap *map; GF_TrackSelectionBox *tsel; trak = gf_isom_get_track_from_file(movie, trackNumber); if (!group_index || !trak || !trak->udta) retu...
1
C
CWE-122
Heap-based Buffer Overflow
A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
https://cwe.mitre.org/data/definitions/122.html
safe
void gf_bs_skip_bytes(GF_BitStream *bs, u64 nbBytes) { if (!bs || !nbBytes) return; gf_bs_align(bs); /*special case for file skipping...*/ if ((bs->bsmode == GF_BITSTREAM_FILE_WRITE) || (bs->bsmode == GF_BITSTREAM_FILE_READ)) { if (bs->cache_write) bs_flush_write_cache(bs); if (bs->cache_read) { u32 cs...
1
C
CWE-122
Heap-based Buffer Overflow
A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
https://cwe.mitre.org/data/definitions/122.html
safe
void gf_filter_pid_inst_del(GF_FilterPidInst *pidinst) { assert(pidinst); gf_filter_pid_inst_reset(pidinst); gf_fq_del(pidinst->packets, (gf_destruct_fun) pcki_del); gf_mx_del(pidinst->pck_mx); gf_list_del(pidinst->pck_reassembly); if (pidinst->props) { assert(pidinst->props->reference_count); gf_mx_p(pidin...
1
C
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
static GF_Err xml_sax_append_string(GF_SAXParser *parser, char *string) { u32 size = parser->line_size; u32 nl_size = string ? (u32) strlen(string) : 0; if (!nl_size) return GF_OK; if ( (parser->alloc_size < size+nl_size+1) /* || (parser->alloc_size / 2 ) > size+nl_size+1 */ ) { parser->alloc_siz...
1
C
CWE-476
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
https://cwe.mitre.org/data/definitions/476.html
safe
static void xml_sax_parse_entity(GF_SAXParser *parser) { char szC[2]; char *ent_name=NULL; u32 i = 0; XML_Entity *ent = (XML_Entity *)gf_list_last(parser->entities); char *skip_chars = " \t\n\r"; i=0; if (ent && ent->value) ent = NULL; if (ent) skip_chars = NULL; szC[1]=0; while (parser->current_pos+i < pars...
1
C
CWE-476
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
https://cwe.mitre.org/data/definitions/476.html
safe
int AVI_read_audio(avi_t *AVI, u8 *audbuf, int bytes, int *continuous) { int nr, todo; s64 pos; if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } if(!AVI->track[AVI->aptr].audio_index) { AVI_errno = AVI_ERR_NO_IDX; return -1; } nr = 0; /* total number of bytes read */ ...
1
C
CWE-122
Heap-based Buffer Overflow
A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
https://cwe.mitre.org/data/definitions/122.html
safe
int AVI_read_frame(avi_t *AVI, u8 *vidbuf, int *keyframe) { int n; if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } if(!AVI->video_index) { AVI_errno = AVI_ERR_NO_IDX; return -1; } if(AVI->video_pos < 0 || AVI->video_pos >= AVI->video_frames) return -1; n = (u32) AVI->...
1
C
CWE-122
Heap-based Buffer Overflow
A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
https://cwe.mitre.org/data/definitions/122.html
safe
static void get_info_from_frame (mpeg2ps_stream_t *sptr, u8 *buffer, u32 buflen) { if (sptr->is_video) { if (MPEG12_ParseSeqHdr(buffer, buflen, &sptr->have_mpeg2, &sptr->h, &sp...
1
C
CWE-476
NULL Pointer Dereference
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
https://cwe.mitre.org/data/definitions/476.html
safe
GF_Err gf_swf_read_header(SWFReader *read) { SWFRec rc; u8 sig[3]; /*get signature*/ sig[0] = gf_bs_read_u8(read->bs); sig[1] = gf_bs_read_u8(read->bs); sig[2] = gf_bs_read_u8(read->bs); /*"FWS" or "CWS"*/ if ( ((sig[0] != 'F') && (sig[0] != 'C')) || (sig[1] != 'W') || (sig[2] != 'S') ) { return GF_NON_COMPL...
1
C
CWE-369
Divide By Zero
The product divides a value by zero.
https://cwe.mitre.org/data/definitions/369.html
safe
static u32 swf_get_32(SWFReader *read) { return gf_bs_read_u32_le(read->bs); }
1
C
CWE-1077
Floating Point Comparison with Incorrect Operator
The code performs a comparison such as an equality test between two float (floating point) values, but it uses comparison operators that do not account for the possibility of loss of precision.
https://cwe.mitre.org/data/definitions/1077.html
safe