This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 447776 - use strtol() instead of atoi()
use strtol() instead of atoi()
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-21 14:32 EDT by David Cantrell
Modified: 2008-06-26 15:23 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-26 15:23:48 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)
NetworkManager-0.7.0-strtol.patch (830 bytes, patch)
2008-05-21 14:32 EDT, David Cantrell
no flags Details | Diff

  None (edit)
Description David Cantrell 2008-05-21 14:32:12 EDT
In src/dhcp-manager/nm-dhcp-manager.c, atoi() is used to convert a string containing the MTU value to 
an int.  atoi() doesn't really do any error checking, so strtol() should be used in its place when appropriate.  
I saw some other uses on atoi() in the source but some of those seem fine since (I assume) glib is doing 
some checking when storing TYPE_INT and such, but you may want to change all of those to be consistent.
Comment 1 David Cantrell 2008-05-21 14:32:12 EDT
Created attachment 306295 [details]
NetworkManager-0.7.0-strtol.patch
Comment 2 Dan Williams 2008-06-26 15:23:48 EDT
committed to trunk, r3776

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