Bug 117939 - subscript out of range + local varaible used before set
subscript out of range + local varaible used before set
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: kdepim (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-10 04:03 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-11 12:49:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2004-03-10 04:03:35 EST
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 12:49:11 EST
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 18:42:03 EST
First bug has been fixed in KDE CVS.
Comment 3 Marcin Garski 2005-02-20 15:01:22 EST
Second bug has been fixed in KDE CVS. So now all bugs have been resolved.

Note You need to log in before you can comment on or make changes to this bug.