ASSERT_ROW_COLUMNS("info-zone-query", d_result[0], 7);
di.id=pdns_stou(d_result[0][0]);
- di.zone=DNSName(d_result[0][1]);
+ try {
+ di.zone=DNSName(d_result[0][1]);
+ } catch (...) {
+ return false;
+ }
stringtok(di.masters, d_result[0][2], " ,\t");
di.last_check=pdns_stou(d_result[0][3]);
di.notified_serial = pdns_stou(d_result[0][4]);
DomainInfo sd;
ASSERT_ROW_COLUMNS("info-all-slaves-query", d_result[n], 4);
sd.id=pdns_stou(d_result[n][0]);
- sd.zone= DNSName(d_result[n][1]);
+ try {
+ sd.zone= DNSName(d_result[n][1]);
+ } catch (...) {
+ continue;
+ }
stringtok(sd.masters, d_result[n][2], ", \t");
sd.last_check=pdns_stou(d_result[n][3]);
sd.backend=this;
DomainInfo sd;
ASSERT_ROW_COLUMNS("info-all-master-query", d_result[n], 6);
sd.id=pdns_stou(d_result[n][0]);
- sd.zone= DNSName(d_result[n][1]);
+ try {
+ sd.zone= DNSName(d_result[n][1]);
+ } catch (...) {
+ continue;
+ }
sd.last_check=pdns_stou(d_result[n][3]);
sd.notified_serial=pdns_stou(d_result[n][4]);
sd.backend=this;
d_beforeOrderQuery_stmt->nextRow(row);
ASSERT_ROW_COLUMNS("get-order-before-query", row, 2);
before=row[0];
- unhashed=DNSName(row[1]);
+ try {
+ unhashed=DNSName(row[1]);
+ } catch (...) {
+ continue;
+ }
}
d_beforeOrderQuery_stmt->reset();
}
d_lastOrderQuery_stmt->nextRow(row);
ASSERT_ROW_COLUMNS("get-order-last-query", row, 2);
before=row[0];
- unhashed=DNSName(row[1]);
+ try {
+ unhashed=DNSName(row[1]);
+ } catch (...) {
+ continue;
+ }
}
d_lastOrderQuery_stmt->reset();
}
while(d_getTSIGKeyQuery_stmt->hasNextRow()) {
d_getTSIGKeyQuery_stmt->nextRow(row);
ASSERT_ROW_COLUMNS("get-tsig-key-query", row, 2);
- if(algorithm->empty() || *algorithm==DNSName(row[0])) {
- *algorithm = DNSName(row[0]);
- *content = row[1];
- }
+ try{
+ if(algorithm->empty() || *algorithm==DNSName(row[0])) {
+ *algorithm = DNSName(row[0]);
+ *content = row[1];
+ }
+ } catch (...) {}
}
d_getTSIGKeyQuery_stmt->reset();
d_getTSIGKeysQuery_stmt->nextRow(row);
ASSERT_ROW_COLUMNS("get-tsig-keys-query", row, 3);
struct TSIGKey key;
- key.name = DNSName(row[0]);
- key.algorithm = DNSName(row[1]);
+ try {
+ key.name = DNSName(row[0]);
+ key.algorithm = DNSName(row[1]);
+ } catch (...) {
+ continue;
+ }
key.key = row[2];
keys.push_back(key);
}
{
// L << "GSQLBackend get() was called for "<<qtype.getName() << " record: ";
SSqlStatement::row_t row;
+
+skiprow:
if(d_query_stmt->hasNextRow()) {
try {
d_query_stmt->nextRow(row);
} catch (SSqlException &e) {
throw PDNSException("GSQLBackend get: "+e.txtReason());
}
- extractRecord(row, r);
+ try {
+ extractRecord(row, r);
+ } catch (...) {
+ goto skiprow;
+ }
return true;
}
ASSERT_ROW_COLUMNS("get-all-domains-query", row, 8);
DomainInfo di;
di.id = pdns_stou(row[0]);
- di.zone = DNSName(row[1]);
+ try {
+ di.zone = DNSName(row[1]);
+ } catch (...) {
+ continue;
+ }
if (!row[4].empty()) {
stringtok(di.masters, row[4], " ,\t");
DNSResourceRecord r;
d_SearchRecordsQuery_stmt->nextRow(row);
ASSERT_ROW_COLUMNS("search-records-query", row, 8);
- extractRecord(row, r);
+ try {
+ extractRecord(row, r);
+ } catch (...) {
+ continue;
+ }
result.push_back(r);
}