code
stringlengths
46
2.03k
label_name
stringclasses
15 values
label
int64
0
14
func (m *Aproto3) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowProto3 } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wir...
CWE-129
6
func (m *Subby) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowOne } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= ...
CWE-129
6
func (m *NidRepNonByteCustomType) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowThetest } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] ...
CWE-129
6
func (m *UnrecognizedWithInner_Inner) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowThetest } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNd...
CWE-129
6
func (m *UnrecognizedWithInner_Inner) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowThetest } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNd...
CWE-129
6
func (m *NinRepNonByteCustomType) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowThetest } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] ...
CWE-129
6
function generate(target, hierarchies, forceOverride) { let current = target; hierarchies.forEach(info => { const descriptor = normalizeDescriptor(info); const { value, type, create, override, created, skipped, got } = descriptor; const name = getNonEmptyPropName(current, descriptor); ...
CWE-1321
2
export function protocolInit(): void { // get all args except `hidden` as it'd mean the app would not get focused // XXX: passing args to protocol handlers only works on Windows, so unpackaged deep-linking // --profile/--profile-dir are passed via the SEARCH_PARAM var in the callback url const args = pr...
CWE-416
5
function generate( target: any, hierarchies: SetupPropParam[], forceOverride?: boolean ) { let current = target; hierarchies.forEach(info => { const descriptor = normalizeDescriptor(info); const {value, type, create, override, created, skipped, got} = descriptor; const name = getNonEmptyPropName(current, de...
CWE-1321
2
async function f(v) { if (v == 3) { return; } stages.push(`f>${v}`); await "X"; f(v + 1); stages.push(`f<${v}`); }
CWE-416
5
function processUrl(url: string): void { if (!global.mainWindow) return; console.log("Handling link: ", url); global.mainWindow.loadURL(url.replace(PROTOCOL, "vector://")); }
CWE-416
5
constructor(line: string, lineNumber: number) { super(`Unsupported type of line: [${lineNumber}]"${line}"`); this.line = line; this.lineNumber = lineNumber; }
CWE-1321
2
var getDefaultObject = function () { return { nested: { thing: { foo: 'bar' }, is: { cool: true } }, dataUndefined: undefined, dataDate: now, dataNumber: 42, dataString: 'foo', dataNull: null, dataBoolean: true }; };
CWE-1321
2
export function setByKeyPath(obj, keyPath, value) { if (!obj || keyPath === undefined) return; if ('isFrozen' in Object && Object.isFrozen(obj)) return; if (typeof keyPath !== 'string' && 'length' in keyPath) { assert(typeof value !== 'string' && 'length' in value); for (var i = 0, l = keyPa...
CWE-1321
2
export function getProfileFromDeeplink(args): string | undefined { // check if we are passed a profile in the SSO callback url const deeplinkUrl = args.find(arg => arg.startsWith('element://')); if (deeplinkUrl && deeplinkUrl.includes(SEARCH_PARAM)) { const parsedUrl = new URL(deeplinkUrl); ...
CWE-416
5