After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 406284 - array bounds read in StringView::strchr
array bounds read in StringView::strchr
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other Linux
: Normal normal
: 1.0
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2007-02-10 02:38 UTC by Charles Kerr
Modified: 2007-02-10 02:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix (543 bytes, patch)
2007-02-10 02:40 UTC, Charles Kerr
none Details | Review

Description Charles Kerr 2007-02-10 02:38:48 UTC
This showed up in a valgrind report submitted by Bruno Barberi Gnecco
in bug #371405.  Since it doesn't directly relate to that bug, I'm
opening a separate ticket for it.

The bug reported is this:

=4104== Invalid read of size 1
==4104==    at 0x401E450: memchr (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==4104==    by 0x80C10FC: (anonymous namespace)::append_text_buffer_nolock(pan::TextMassager const*, _GtkTextBuffer*, pan::StringV
iew const&, bool, bool, bool) (in /usr/local/bin/pan)
==4104==    by 0x80C1B27: pan::BodyPane::append_part(_GMimeObject*, _GdkRectangle*) (in /usr/local/bin/pan)
==4104==  Address 0x5FC0BD9 is 0 bytes after a block of size 65 alloc'd
==4104==    at 0x401C802: operator new(unsigned) (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==4104==    by 0x4657215: std::string::_Rep::_S_create(unsigned, unsigned, std::allocator<char> const&) (in /usr/lib/libstdc++.so.
6.0.3)
==4104==    by 0x46579CB: std::string::_M_mutate(unsigned, unsigned, unsigned) (in /usr/lib/libstdc++.so.6.0.3)
==4104==    by 0x4657CBD: std::string::assign(char const*, unsigned) (in /usr/lib/libstdc++.so.6.0.3)
==4104==    by 0x80C0CB0: (anonymous namespace)::append_text_buffer_nolock(pan::TextMassager const*, _GtkTextBuffer*, pan::StringV
iew const&, bool, bool, bool) (in /usr/local/bin/pan)
==4104==    by 0x80C1B27: pan::BodyPane::append_part(_GMimeObject*, _GdkRectangle*) (in /usr/local/bin/pan)
==4104==    by 0x80C1DF3: pan::BodyPane::foreach_part_cb(_GMimeObject*, void*) (in /usr/local/bin/pan)
==4104==    by 0x456063B: g_mime_multipart_foreach (gmime-multipart.c:739)
Comment 1 Charles Kerr 2007-02-10 02:40:04 UTC
Created attachment 82261 [details] [review]
patch to fix