0
0
mirror of https://github.com/cjdelisle/cjdns synced 2025-10-06 00:32:50 +02:00

Merge branch 'crashey' into v21

This commit is contained in:
Caleb James DeLisle
2018-10-14 19:01:38 +02:00
2 changed files with 6 additions and 2 deletions

View File

@@ -832,6 +832,10 @@ static struct Node_Link* discoverLinkC(struct NodeStore_pvt* store,
if (pathParentChild == findClosest_INVALID) {
return NULL;
}
if (!EncodingScheme_isOneHop(closest->child->encodingScheme, pathParentChild)) {
Log_debug(store->logger, "Not discovering link because it's multi-hop");
return NULL;
}
struct Node_Two* parent = closest->child;

View File

@@ -87,8 +87,8 @@ var mkFuzzCase = function (inFile, outPath, testId, cb) {
if (err) { throw err; }
ret = ret.replace(/#[^\n]*\n/g, '');
ret = ret.replace(/[\s]*/g, '');
var out = Buffer.from(ret, 'hex');
var id = Buffer.alloc(4);
var out = new Buffer(ret, 'hex');
var id = new Buffer(4);
id.writeInt32BE(testId, 0);
Fs.writeFile(outPath, Buffer.concat([id, out]), function (err) {
if (err) { throw err; }