From 908b0886425f995c21b12be69a881397ac1cfc04 Mon Sep 17 00:00:00 2001 From: Doug Hoyte Date: Thu, 12 Jan 2023 12:30:51 -0500 Subject: [PATCH] increase max subId length from 39 to 63. snort.social was using size 45. fixes issue #7 --- src/Subscription.h | 6 +++--- src/constants.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Subscription.h b/src/Subscription.h index 02851bb..037bf6e 100644 --- a/src/Subscription.h +++ b/src/Subscription.h @@ -4,11 +4,11 @@ struct SubId { - char buf[40]; + char buf[64]; SubId(std::string_view val) { - static_assert(MAX_SUBID_SIZE == 39, "MAX_SUBID_SIZE mismatch"); - if (val.size() > 39) throw herr("subscription id too long"); + static_assert(MAX_SUBID_SIZE == 63, "MAX_SUBID_SIZE mismatch"); + if (val.size() > 63) throw herr("subscription id too long"); if (val.size() == 0) throw herr("subscription id too short"); auto badChar = [](char c){ diff --git a/src/constants.h b/src/constants.h index 9d27dc3..fb10191 100644 --- a/src/constants.h +++ b/src/constants.h @@ -1,3 +1,3 @@ #pragma once -const size_t MAX_SUBID_SIZE = 39; +const size_t MAX_SUBID_SIZE = 63;