mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-31 02:21:36 +00:00
Fix low-risk uninitialized memory buffer issue
This commit is contained in:
parent
0b57a26e42
commit
2ee240ea16
@ -155,8 +155,10 @@ Client.scrape = function (opts, cb) {
|
||||
})
|
||||
|
||||
opts.infoHash = Array.isArray(opts.infoHash)
|
||||
? opts.infoHash.map(function (infoHash) { return new Buffer(infoHash, 'hex') })
|
||||
: new Buffer(opts.infoHash, 'hex')
|
||||
? opts.infoHash.map(function (infoHash) {
|
||||
return new Buffer(String(infoHash), 'hex')
|
||||
})
|
||||
: new Buffer(String(opts.infoHash), 'hex')
|
||||
client.scrape({ infoHash: opts.infoHash })
|
||||
return client
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user