Bug 58163 - Missing decimal_point check in getfloat()
Missing decimal_point check in getfloat()
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: procps (Show other bugs)
7.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alexander Larsson
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-10 08:11 EST by Dmitry V. Levin
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-07-01 10:06:59 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 Dmitry V. Levin 2002-01-10 08:11:12 EST
Description of Problem:
For locales where nl_langinfo(DECIMAL_POINT) != ".",
top program doesn't accept float update intervals.

Version-Release number of selected component (if applicable):
procps >= 2.0.7 (all redhat releases with Jakub's patch).

How Reproducible:
Always for locales described above.

Steps to Reproduce:
1. run top
2. type s
3. type 0,5

Actual Results:
That's not a float!
 
Expected Results:
Set update interval to half of second.

Additional Information:

Fix is trivial:
--- procps-2.0.7~/top.c
+++ procps-2.0.7/top.c
@@ -707,7 +707,7 @@
     line = getstr();
 
     for (i = 0; line[i]; i++) {
-
if (!isdigit(line[i]) && line[i] != '.' && line[i] != '-') {
+
if (!isdigit(line[i]) && line[i] != decimal_point[0] && line[i] != '-') {
 	    SHOWMESSAGE(("That's not a float!"));
 	    return (BAD_INPUT);
 }
Comment 1 Alexander Larsson 2002-08-08 10:21:30 EDT
Should be fixed in 2.0.7-24

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