Bug 117939

Summary: subscript out of range + local varaible used before set
Product: [Fedora] Fedora Reporter: d.binderman
Component: kdepimAssignee: Than Ngo <than>
Status: CLOSED UPSTREAM QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: mgarski
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-12-11 17:49:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description d.binderman 2004-03-10 09:03:35 UTC
Description of problem:

I just tried to compile Fedora Core2 Test1 package kdepim-3.1.95-0.1

The compiler said

1.

sspm.c(1173): remark #592: variable "cc" is used before its value is set

The source code is

    int cc;
    char buf[4] = {0,0,0,0};
    int p = 0;
    int valid_data = 0;
    size_t size_out=0;

    while (*src && p<(int)*size && (cc!=  -1)) {

Suggest init cc at its declaration.

2.

vobject.c(1230): warning #175: subscript out of range

The source code is

        buf2[sizeof(buf2)] = '\0';

Clearly wrong. Suggest

        buf2[ sizeof(buf2) - 1] = '\0';



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Marcin Garski 2004-12-11 17:49:11 UTC
Thank you for the bug report. This bug should be fixed by KDE
developers so everyone could use fixed version (not just FC users).

I've file a bug report in KDE bugzilla:
1) https://bugs.kde.org/show_bug.cgi?id=94937
2) https://bugs.kde.org/show_bug.cgi?id=94940

If you want to follow what happens to the bug, you can add yourself
to the upstream report.

Comment 2 Marcin Garski 2005-02-16 23:42:03 UTC
First bug has been fixed in KDE CVS.

Comment 3 Marcin Garski 2005-02-20 20:01:22 UTC
Second bug has been fixed in KDE CVS. So now all bugs have been resolved.