Bug 115227 - hexprinter.cc 'size.height' is used uninitialized in this function
Summary: hexprinter.cc 'size.height' is used uninitialized in this function
Status: RESOLVED FIXED
Alias: None
Product: khexedit
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Espen Sand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-27 21:54 UTC by Marcin Garski
Modified: 2005-10-28 01:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Garski 2005-10-27 21:54:15 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc version 4.0.1 20050727 (Red Hat 4.0.1-5) 
OS:                Linux

In khexedit/hexprinter.cc file there is a function:

SPageSize CHexPrinter::pageFullSize( void )
{
  QPaintDeviceMetrics metric( this );
  SPageSize size;
  size.width = metric.width();
  size.width = metric.height();
  
  return( size );
}

Second 'size.width' probably should be 'size.height', otherwise 'size.height' is uninitialized.
Comment 1 Nicolas Goutte 2005-10-28 01:14:09 UTC
SVN commit 475024 by goutte:

Initialize correctly the variables
(Not tested)
CCBUG:115227


 M  +1 -1      hexprinter.cc  


--- branches/KDE/3.5/kdeutils/khexedit/hexprinter.cc #475023:475024
@@ -131,7 +131,7 @@
   QPaintDeviceMetrics metric( this );
   SPageSize size;
   size.width = metric.width();
-  size.width = metric.height();
+  size.height = metric.height();
   
   return( size );
 }
Comment 2 Nicolas Goutte 2005-10-28 01:24:31 UTC
SVN commit 475026 by goutte:

Initialize correctly the variables
(Foreward port of revision 475024; not tested)
BUG:115227


 M  +1 -1      hexprinter.cc  


--- trunk/KDE/kdeutils/khexedit/hexprinter.cc #475025:475026
@@ -131,7 +131,7 @@
   QPaintDeviceMetrics metric( this );
   SPageSize size;
   size.width = metric.width();
-  size.width = metric.height();
+  height.width = metric.height();
   
   return( size );
 }
Comment 3 Nicolas Goutte 2005-10-28 01:25:55 UTC
SVN commit 475028 by goutte:

Grr, writing rubbish does not count...
CCBUG:115227


 M  +1 -1      hexprinter.cc  


--- trunk/KDE/kdeutils/khexedit/hexprinter.cc #475027:475028
@@ -131,7 +131,7 @@
   QPaintDeviceMetrics metric( this );
   SPageSize size;
   size.width = metric.width();
-  height.width = metric.height();
+  size.height = metric.height();
   
   return( size );
 }