diff options
author | Guy Harris <gharris@sonic.net> | 2020-10-04 12:56:52 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-10-04 12:56:52 -0700 |
commit | 8a77692171d2a8625469f494ab5cfce51b0eb01f (patch) | |
tree | 03e065d0bafbe7d5d259c80d0488ef08a5a4311d | |
parent | f52e62ac9f716f135f0a28224fd1c73cae7615b4 (diff) | |
download | wireshark-8a77692171d2a8625469f494ab5cfce51b0eb01f.tar.gz wireshark-8a77692171d2a8625469f494ab5cfce51b0eb01f.tar.bz2 wireshark-8a77692171d2a8625469f494ab5cfce51b0eb01f.zip |
g_mallocate all strings returned from topic_action_url().
Callers assume it's been g_mallocated and attempt to free it.
-rw-r--r-- | ui/help_url.c | 28 | ||||
-rw-r--r-- | ui/urls.h | 2 |
2 files changed, 15 insertions, 15 deletions
diff --git a/ui/help_url.c b/ui/help_url.c index 7ea8429277..f50cfc76b2 100644 --- a/ui/help_url.c +++ b/ui/help_url.c @@ -81,43 +81,43 @@ topic_action_url(topic_action_e action) switch(action) { /* pages online at www.wireshark.org */ case(ONLINEPAGE_HOME): - url = WS_HOME_PAGE_URL; + url = g_strdup(WS_HOME_PAGE_URL); break; case(ONLINEPAGE_WIKI): - url = WS_WIKI_HOME_URL; + url = g_strdup(WS_WIKI_HOME_URL); break; case(ONLINEPAGE_DOWNLOAD): - url = WS_DOWNLOAD_URL; + url = g_strdup(WS_DOWNLOAD_URL); break; case(ONLINEPAGE_DOCS): - url = WS_DOCS_URL; + url = g_strdup(WS_DOCS_URL); break; case(ONLINEPAGE_USERGUIDE): - url = WS_DOCS_URL "/wsug_html_chunked/"; + url = g_strdup(WS_DOCS_URL "/wsug_html_chunked/"); break; case(ONLINEPAGE_FAQ): - url = WS_FAQ_URL; + url = g_strdup(WS_FAQ_URL); break; case(ONLINEPAGE_ASK): - url = WS_Q_AND_A_URL; + url = g_strdup(WS_Q_AND_A_URL); break; case(ONLINEPAGE_SAMPLE_FILES): - url = WS_WIKI_URL("SampleCaptures"); + url = g_strdup(WS_WIKI_URL("SampleCaptures")); break; case(ONLINEPAGE_CAPTURE_SETUP): - url = WS_WIKI_URL("CaptureSetup"); + url = g_strdup(WS_WIKI_URL("CaptureSetup")); break; case(ONLINEPAGE_NETWORK_MEDIA): - url = WS_WIKI_URL("CaptureSetup/NetworkMedia"); + url = g_strdup(WS_WIKI_URL("CaptureSetup/NetworkMedia")); break; case(ONLINEPAGE_SAMPLE_CAPTURES): - url = WS_WIKI_URL("SampleCaptures"); + url = g_strdup(WS_WIKI_URL("SampleCaptures")); break; case(ONLINEPAGE_SECURITY): - url = WS_WIKI_URL("Security"); + url = g_strdup(WS_WIKI_URL("Security")); break; case(ONLINEPAGE_CHIMNEY): - url = WS_WIKI_URL("CaptureSetup/Offloading#chimney"); + url = g_strdup(WS_WIKI_URL("CaptureSetup/Offloading#chimney")); break; /* local manual pages */ @@ -314,7 +314,7 @@ topic_action_url(topic_action_e action) case(TOPIC_ACTION_NONE): default: g_assert_not_reached(); - url = WS_HOME_PAGE_URL; + url = g_strdup(WS_HOME_PAGE_URL); } return url; @@ -10,7 +10,7 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ -#define WS_HOME_PAGE_URL "https://www.wireshark.org"; +#define WS_HOME_PAGE_URL "https://www.wireshark.org" #define WS_DOWNLOAD_URL "https://www.wireshark.org/download.html" #define WS_DOCS_URL "https://www.wireshark.org/docs/" #define WS_FAQ_URL "https://www.wireshark.org/faq.html" |