Bug 447776 - use strtol() instead of atoi()
Summary: use strtol() instead of atoi()
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-21 18:32 UTC by David Cantrell
Modified: 2008-06-26 19:23 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-06-26 19:23:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
NetworkManager-0.7.0-strtol.patch (830 bytes, patch)
2008-05-21 18:32 UTC, David Cantrell
no flags Details | Diff

Description David Cantrell 2008-05-21 18:32:12 UTC
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 18:32:12 UTC
Created attachment 306295 [details]
NetworkManager-0.7.0-strtol.patch

Comment 2 Dan Williams 2008-06-26 19:23:48 UTC
committed to trunk, r3776


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