[Digikam-devel] New Defects reported by Coverity Scan for digiKam
Sayantan Datta
kenzo.zombie at gmail.com
Sat Apr 6 13:40:05 BST 2013
Hi,
The patch file is added. I added a few lines to initialize the array before
using it.
-----------------------------------------------------------------
Sayantan Datta
Junior Year
National Institute of Technology, Durgapur
Phone : (+91) 9564370661
IRC : kenzo450D on #fedora, #nitdgplug, #kde
On Sat, Apr 6, 2013 at 5:25 PM, <scan-admin at coverity.com> wrote:
>
> Hi,
>
> Please find the latest report on new defect(s) introduced to digiKam found
> with Coverity SCAN
>
> Defect(s) Reported-by: Coverity Scan
>
>
> ** CID 997051: Uninitialized scalar variable (UNINIT)
> /mnt/devel/GIT/3.x/core/libs/dimg/filters/transform/autocrop.cpp: 878
>
> http://scan5.coverity.com:8080//sourcebrowser.htm?projectId=10358#mergedDefectId=997051
>
>
> ________________________________________________________________________
> CID 997051: Uninitialized scalar variable (UNINIT)
>
> /mnt/devel/GIT/3.x/core/libs/dimg/filters/transform/autocrop.cpp: 842 (
> var_decl)
> 839 // --- Step 2 -- Search between local minima
> 840 kDebug() << "In local minima function";
> 841 //We need to find the maxima between the first two local
> minima from either side
> >>> Declaring variable "blackpointCount" without initializer.
> 842 int blackpointCount[threshold.width()];
> 843 int leftminima = 0;
> 844 int rightminima = (threshold.width()-1);
> 845 int topCropLine = 0;
> 846 int bottomCropLine = threshold.height()-1;
>
>
> /mnt/devel/GIT/3.x/core/libs/dimg/filters/transform/autocrop.cpp: 878 (
> uninit_use)
> 875
> 876 for(j=1;j<threshold.width();j++)
> 877 {
> >>> CID 997051: Uninitialized scalar variable (UNINIT)
> >>> Using uninitialized value "blackpointCount[j]".
> 878 if((blackpointCount[j]>blackpointCount[j-1]) &&
> (blackpointCount[j]<(0.2*threshold.height())))
> 879 {
> 880 leftminima = j-1;
> 881 break;
> 882 }
>
> ________________________________________________________________________
> To view the defects in Coverity Scan visit, http://scan5.coverity.com:8080
>
> If you don't have a username, you can request one by emailing:
> scan-admin at coverity.com
>
> To unsubscribe from the email notification for new defects,
> http://scan.coverity.com/email_unsubscribe.html
> If you are project owner, you can subscribe your team member by accessing
> http://scan.coverity.com/email_subscription.html
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20130406/b74a15fa/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: polishautocrop.patch
Type: application/octet-stream
Size: 1328 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20130406/b74a15fa/attachment.obj>
More information about the Digikam-devel
mailing list