stardict Segmentation fault (core dumped)

Bug #1999288 reported by Lin Xiao
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
stardict (Ubuntu)
New
Undecided
Unassigned

Bug Description

Description:
stardict segfault frequently due to uninitialized pointer from stardict-youdaodict-plugin

Additional info:
Affected Version: 3.0.7+git20211225+dfsg-1

Steps to reproduce:
1.start stardict
2.enter random long string in the search field which is unlikely to be a real word(e.g. 'aaafdsfdsdfsfaasfda')
3.delete and reenter some chars back and forth repeatedly
4.stardict will segfault very quickly

Tags: jammy patch
Revision history for this message
Lin Xiao (xliefssy) wrote :

--- a/dict/stardict-plugins/stardict-youdaodict-plugin/stardict_youdaodict.cpp 2022-10-04 16:42:39.035798471 +0800
+++ b/dict/stardict-plugins/stardict-youdaodict-plugin/stardict_youdaodict.cpp 2022-10-09 10:02:34.040190482 +0800
@@ -200,6 +200,7 @@

        QueryInfo *qi = (QueryInfo *)userdata;
        NetDictResponse *resp = new NetDictResponse;
+ resp->data = nullptr;
        resp->bookname = _("www.YouDao.com");
        resp->booklink = "http://www.youdao.com";
        resp->word = qi->word; // So neen't free qi->word;

tags: added: jammy patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.