You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ npm i @chainsafe/discv5
$ node crash_TypeError_tostring_undef_enr_lodestar.js
/home/scop/node_modules/@chainsafe/discv5/lib/enr/enr.js:76
return this.get("id").toString("utf8");
^
TypeError: Cannot read property 'toString' of undefined
at Map.get id [as id] (/home/scop/node_modules/@chainsafe/discv5/lib/enr/enr.js:76:30)
at Map.verify (/home/scop/node_modules/@chainsafe/discv5/lib/enr/enr.js:187:22)
at Function.decodeFromValues (/home/scop/node_modules/@chainsafe/discv5/lib/enr/enr.js:55:18)
at Function.decode (/home/scop/node_modules/@chainsafe/discv5/lib/enr/enr.js:62:20)
at Function.decodeTxt (/home/scop/node_modules/@chainsafe/discv5/lib/enr/enr.js:68:20)
at Object.<anonymous> (XXX/crash_TypeError_tostring_undef_enr_lodestar.js:5:12)
at Module._compile (internal/modules/cjs/loader.js:936:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
at Module.load (internal/modules/cjs/loader.js:790:32)
at Function.Module._load (internal/modules/cjs/loader.js:703:12)
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
pventuzelo
changed the title
[Crash/Fuzzing] TypeError "encoded.startsWith is not a function" when parsing ENR string
[Crash/Fuzzing] "TypeError: Cannot read property 'toString' of undefined" when parsing ENR string
May 19, 2020
Describe the bug
During fuzzing with beaconfuzz, I found this TypeError crash inside the enr library when parsing invalid enr string.
Expected behavior
Should throw an
Error
since this string is invalid.Steps to Reproduce
crash_TypeError_tostring_undef_enr_lodestar.js:
Run:
Desktop (please complete the following information):
Ubuntu 18.04
0.1.2
v12.9.1
The text was updated successfully, but these errors were encountered: