1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Fix pointer loop bug and add descriptive exceptions

This commit is contained in:
Gaya Cohen
2021-05-24 15:12:23 +03:00
parent 5858132261
commit c20c82bcb5
2 changed files with 18 additions and 1 deletions

View File

@@ -66,6 +66,19 @@ public:
malformed_packet() : exception_base("Malformed packet") { }
};
class DNS_decompression_pointer_out_of_bounds : public exception_base {
public:
DNS_decompression_pointer_out_of_bounds() : exception_base("DNS decompression pointer out of bounds") { }
};
/**
* \brief Exception thrown when a DNS decompression pointer loops.
*/
class DNS_decompression_pointer_loops : public exception_base {
public:
DNS_decompression_pointer_loops() : exception_base("DNS decompression pointer loops") { }
};
/**
* \brief Exception thrown when serializing a packet fails.
*/