Bug 121720 - subscript out of range + missing return expression
subscript out of range + missing return expression
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kdenetwork (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-26 15:14 EDT by d.binderman
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version: 3.4.3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-27 15:27:14 EDT
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-04-26 15:14:40 EDT
Description of problem:

I just tried to compile Core2 Test2 package kdenetwork-3.2.1-2

The compiler said

1.

oscarsocket.aim.cpp(51): warning #175: subscript out of range

The source code is

    char digest[16];
    encodePassword(&digest[0]);
    digest[16] = '\0';  //do this so that addTLV sees a NULL-terminator

Clearly broken code. Suggest re-work to avoid reading non existant
local variable.

2.

xwin.c(518): warning #117: non-void function "xwin_process_event"
should return
a value

The source code is

int
xwin_process_event(XEvent xevent)
{
	/* ... */

	if ((IC != NULL) && (XFilterEvent(&xevent, None) == True))
    	{
		DEBUG_KBD(("Filtering event\n"));
	    	return;
    	}


Suggest adding a value to the return statement.





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 2005-10-27 15:27:14 EDT
1. Bug is fixed in KDE SVN and 3.4.3.

kdenetwork/kopete/protocols/oscar/liboscar/aimlogintask.cpp

QByteArray digest( 17 ); //apparently MD5 digests are 16 bytes long
encodePassword( digest );
digest[16] = '\0';  //do this so that addTLV sees a NULL-terminator

2. There isn't xwin.c file in KDE SVN so the bug don't exist :)
However xwin.x cames from rdesktop, in lastes verision 1.4.1 this bug is fixed.

static int
xwin_process_events(void)
{
/* ... */
if ((g_IC != NULL) && (XFilterEvent(&xevent, None) == True))
                {
                        DEBUG_KBD(("Filtering event\n"));
                        continue;
                }
/* ... */
}

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