Skip to content

Commit

Permalink
Merge pull request #112 from jelu/release/1.7.1
Browse files Browse the repository at this point in the history
Release/1.7.1
  • Loading branch information
jelu authored Jun 2, 2022
2 parents 22276a5 + c5806ef commit b10dbef
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2022-06-02 Jerry Lundström

Release 1.7.1

This patch release fixes a bug in the domain name parsing that cuts
off very long names.

4ec95e7 FQDN parsing

2022-04-13 Jerry Lundström

Release 1.7.0
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# along with PacketQ. If not, see <http://www.gnu.org/licenses/>.

AC_PREREQ(2.61)
AC_INIT([packetq], [1.7.0], [[email protected]], [packetq], [https://github.com/DNS-OARC/packetq/issues])
AC_INIT([packetq], [1.7.1], [[email protected]], [packetq], [https://github.com/DNS-OARC/packetq/issues])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AC_CONFIG_SRCDIR([src/packetq.cpp])
AC_CONFIG_HEADER([src/config.h])
Expand Down
11 changes: 11 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
packetq (1.7.1-1~unstable+1) unstable; urgency=low

* Release 1.7.1

This patch release fixes a bug in the domain name parsing that cuts
off very long names.

4ec95e7 FQDN parsing

-- Jerry Lundström <[email protected]> Thu, 02 Jun 2022 15:09:00 +0200

packetq (1.7.0-1~unstable+1) unstable; urgency=low

* Release 1.7.0
Expand Down
8 changes: 7 additions & 1 deletion rpm/packetq.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: packetq
Version: 1.7.0
Version: 1.7.1
Release: 1%{?dist}
Summary: A tool that provides a basic SQL-frontend to PCAP-files
Group: Productivity/Networking/DNS/Utilities
Expand Down Expand Up @@ -56,6 +56,12 @@ rm -rf $RPM_BUILD_ROOT


%changelog
* Thu Jun 02 2022 Jerry Lundström <[email protected]> 1.7.1-1
- Release 1.7.1
* This patch release fixes a bug in the domain name parsing that cuts
off very long names.
* Commits:
4ec95e7 FQDN parsing
* Wed Apr 13 2022 Jerry Lundström <[email protected]> 1.7.0-1
- Release 1.7.0
* This release adds two new columns for the number of labels in the
Expand Down
6 changes: 3 additions & 3 deletions src/dns.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class DNSMessage {

class Name {
public:
char fqdn[512];
char fqdn[2048]; // escaping needs *4 the space
int labels;

Name()
Expand Down Expand Up @@ -243,7 +243,6 @@ class DNSMessage {
int savedoffs = 0;
int n = get_ubyte(offs++);
char* out = &name.fqdn[0];
int size = sizeof(name.fqdn);
if (n == 0)
out[p++] = '.';

Expand All @@ -262,7 +261,8 @@ class DNSMessage {
}

// if the string is too long restart and mess it up
if (n + 20 + p > size / 2)
// check if we can fit a fully escaped label + . and reserve for zeroing it later
if (p + (n * 4) + 1 > sizeof(name.fqdn) - 1)
p = 0;

while (n-- > 0) {
Expand Down

0 comments on commit b10dbef

Please sign in to comment.