[PATCH 07/10] libiberty: Correctly handle error result in dlang_parse_structlit()

Ben L bobsayshilol@live.co.uk
Fri Jan 11 00:18:00 GMT 2019


Hi all,

First time emailing gcc-patches, so I'm sorry if I get any of this wrong or if
there's obvious errors repeated in my patches. AFAICT I should be sending each
change individually rather than as one bulk patch, so I'm sorry about the spam
too.

All of these changes were found by fuzzing libiberty's demanglers over the
past week, and I have at least one more that it's currently crashing out on
but I haven't had time to look into why yet.

Obviously since this is my first time emailing I don't have write access to
commit any of these, so if any are approved then I'd be grateful if you can
commit them too.

Thanks,
Ben

--

The number of elements were being taken as valid and for each one a separator
was appended to the output, resulting in a huge memory bloat before crashing
later on due to a signed integer overflow.

     * d-demangle.c (dlang_parse_structlit): Correctly handle error result.
     * testsuite/d-demangle-expected: Add testcase.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-libiberty-Correctly-handle-error-result-in-dlang_par.patch
Type: text/x-patch
Size: 1493 bytes
Desc: 0007-libiberty-Correctly-handle-error-result-in-dlang_par.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190111/5c5db532/attachment.bin>


More information about the Gcc-patches mailing list