Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coredump when client send declined #41

Open
algorithmn opened this issue Nov 2, 2020 · 1 comment
Open

coredump when client send declined #41

algorithmn opened this issue Nov 2, 2020 · 1 comment

Comments

@algorithmn
Copy link

I found the mail with the same problem. Is there any patch for this problem
https://klub.com.pl/lists/dibbler-devel/2016-July/000137.html

@armcc
Copy link
Contributor

armcc commented Nov 16, 2020

Does this help?

diff --git a/Messages/Msg.cpp b/Messages/Msg.cpp
index 00f887a7..49dca057 100644
--- a/Messages/Msg.cpp
+++ b/Messages/Msg.cpp
@@ -71,7 +71,10 @@ int TMsg::getSize()
     TOptList::iterator opt;
     for (opt = Options.begin(); opt!=Options.end(); ++opt)
     {
-       pktsize += (*opt)->getSize();
+        if ((*opt) != NULL)
+        {
+           pktsize += (*opt)->getSize();
+        }
     }
     return pktsize + 4;
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants