Review Request 127486: Fix uninitialized int array in UnicodeGroupProber
Dominik Haumann
dhaumann at kde.org
Fri Mar 25 16:53:42 UTC 2016
> On March 24, 2016, 11:29 p.m., Aleix Pol Gonzalez wrote:
> > src/probers/UnicodeGroupProber.cpp, line 80
> > <https://git.reviewboard.kde.org/r/127486/diff/1/?file=453912#file453912line80>
> >
> > `(uint)` shouldn't be necessary, no? Otherwise:
> > `const uint weight_BOM(sqrt((double)aLen) + aLen / 10.0);`
> >
> > Or even easier:
> > `const uint weight_BOM = aLen>>1 + aLen / 10;`
Right shift is not the same as sqrt :-)
- Dominik
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127486/#review93955
-----------------------------------------------------------
On March 25, 2016, 4:53 p.m., Dominik Haumann wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127486/
> -----------------------------------------------------------
>
> (Updated March 25, 2016, 4:53 p.m.)
>
>
> Review request for KDE Frameworks.
>
>
> Bugs: 357341
> https://bugs.kde.org/show_bug.cgi?id=357341
>
>
> Repository: kcodecs
>
>
> Description
> -------
>
> When loading the file from bug https://bugs.kde.org/show_bug.cgi?id=360797 with kwrite one gets a segfault. Valgrind tells us 'count' is uninitialized (see line 83).
>
> This patch
> - moves variables to local scopes
> - initializes the variable count with 5 times 0.
>
> The backtrace in bug https://bugs.kde.org/show_bug.cgi?id=357341 is fixed this way. However, there is a second crash still happening, which still needs investigation.
>
>
> Diffs
> -----
>
> src/probers/UnicodeGroupProber.cpp 1d86f08
>
> Diff: https://git.reviewboard.kde.org/r/127486/diff/
>
>
> Testing
> -------
>
> - unit tests still pass
> - The encoding prober does not crash at the location anymore - it crashes a bit later (another issue)
>
>
> Thanks,
>
> Dominik Haumann
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160325/0cf23a91/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list