Public bug reported: Ubuntu version: 18.04 libx11 version:1.6.4 Hello,I found some potential bugs in package libx11-xcb-dev,and the microsoft word file in the attachment I uploaded shows the occurrence process of the bug in a graphical way.Would you help me check whether the bugs mentioned below are true? I'm not 100% sure that the bugs I submitted is correct. I hope you don't mind seeing the wrong bug I submitted.Thank you very much for your patience.
In file libx11-1.6.4/modules/im/ximcp/imLcPrs.c,defination of parsestringfile,line 734. The statement "tbp=malloc(size);"allocate memory to tbp and in line 738,if select false branch at this statement,tbp will not be freed correctly.the process of this potential bug is shown in figure 1. In file libx11-1.6.4/src/xlibi18n/lcDB.c,defination of f_numeric,line 882. The statement "wordp=malloc(len+1);"allocate memory to wordp and in line 883,if select false branch at this statement,function f_numeric will go on to execute.In line 910 or line 915,if select false branch at this statement,wordp will not be freed correctly.the process of this potential bug is shown in figure 2. In file libx11-1.6.4/src/xlibi18n/lcDB.c,defination of f_default,line 933. The statement "wordp=malloc(len+1);"allocate memory to wordp and in line 934,if select false branch at this statement,function f_default will go on to execute.and if select true branch in line 938,flow goto err,In line 989,if select false branch here,wordp will not be freed correctly.the process of this potential bug is shown in figure 3. ** Affects: libx11 (Ubuntu) Importance: Undecided Status: New ** Attachment added: "libx11_memory_leak.docx" https://bugs.launchpad.net/bugs/1940018/+attachment/5518042/+files/libx11_memory_leak.docx -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1940018 Title: Several potential bugs of memory leak in libx11-1.6.4 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libx11/+bug/1940018/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs