diff options
-rw-r--r-- | changes/bug31898 | 4 | ||||
-rw-r--r-- | src/lib/dispatch/dispatch_new.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/changes/bug31898 b/changes/bug31898 new file mode 100644 index 0000000000..6f3e0a5465 --- /dev/null +++ b/changes/bug31898 @@ -0,0 +1,4 @@ + o Major bugfixes (embedded Tor): + - Avoid a possible crash when restarting Tor in embedded mode and + enabling a different set of publish/subscribe messages. Fixes bug + 31898; bugfix on 0.4.1.1-alpha. diff --git a/src/lib/dispatch/dispatch_new.c b/src/lib/dispatch/dispatch_new.c index 4467813064..d8e59d610a 100644 --- a/src/lib/dispatch/dispatch_new.c +++ b/src/lib/dispatch/dispatch_new.c @@ -34,7 +34,7 @@ max_in_u16_sl(const smartlist_t *sl, int dflt) SMARTLIST_FOREACH_BEGIN(sl, uint16_t *, u) { if (!maxptr) maxptr = u; - else if (*u > *maxptr) + else if (u && *u > *maxptr) maxptr = u; } SMARTLIST_FOREACH_END(u); |