Bug 498182 - procps string size issue
procps string size issue
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: procps (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Novotny
Fedora Extras Quality Assurance
:
Depends On: 469495
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-29 06:43 EDT by Daniel Novotny
Modified: 2009-05-03 02:46 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 469495
Environment:
Last Closed: 2009-04-29 06:59:21 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 Daniel Novotny 2009-04-29 06:43:19 EDT
+++ This bug was initially created as a clone of Bug #469495 +++

Description of problem:
proc/devname.c has an array that is 4 characters wide that is trying to hold strings that are 5 bytes wide, like "AM12". I will attach a patch fixing this. 

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

Additional Info:
fedora has the same problem.

--- Additional comment from sgrubb@redhat.com on 2008-11-01 10:59:49 EDT ---

Created an attachment (id=322171)
patch fixing problems described herein

This patch widens the strings so they have the NUL terminator. Please apply to RHEL when the opportunity hits and to Fedora at first chance. Thanks!
Comment 1 Daniel Novotny 2009-04-29 06:59:21 EDT
fixed in procps-3.2.7-28.fc12
Comment 2 Albert Cahalan 2009-05-03 02:46:57 EDT
Not a bug.

This is one of the differences between C and C++. The strings are in fact exactly the size requested. Unlike a C++ compiler, a C compiler will respect the programmer's wishes.

The "strings" are of course lacking the typical NUL byte in some cases. This is correctly handled by the code.

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