Bug 121720

Summary: subscript out of range + missing return expression
Product: [Fedora] Fedora Reporter: d.binderman
Component: kdenetworkAssignee: Than Ngo <than>
Status: CLOSED CURRENTRELEASE 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: 3.4.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-27 19:27:14 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-04-26 19:14:40 UTC
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 19:27:14 UTC
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;
                }
/* ... */
}