Project

General

Profile

Actions

Task #2257

closed

ndns-add-rr-from-file segfaults when input file cannot be loaded

Added by Alex Afanasyev about 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
12/01/2014
Due date:
% Done:

0%

Estimated time:

Description

Here is what I'm running, where cert-file some random stuff

ndns@spurs:~/repo2ndns$ ./ndns/build/bin/ndns-add-rr-from-file /ndn cert-file

Expected output:

Error: input does not contain a valid Data packet (is it in base64 format?)

Actual:

Segmentation fault

partial gdb backtrace:

(gdb) bt
#0  0x08178f73 in ndn::RegexTopMatcher::match(ndn::Name const&) ()
#1  0x080d4d32 in ndn::ndns::ManagementTool::addRrSet (this=0xbffffbe0, zoneName=..., inFile=..., ttl=...,
    inputDskCertName=...) at ../src/mgmt/management-tool.cpp:339
#2  0x0809dd1b in main (argc=3, argv=0xbffffd04) at ../tools/ndns-add-rr-from-file.cpp:113

Before line 339 in management-tool.cpp, nobody is checking that data points to a valid data packet.

Actions #1

Updated by Jiewen Tan almost 10 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Jiewen Tan almost 10 years ago

Hi Alex,

How should I check whether the data points to a valid data packet?

Actions #3

Updated by Jiewen Tan almost 10 years ago

  • Status changed from In Progress to Code review
Actions #4

Updated by Jiewen Tan over 9 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF