]> granicus.if.org Git - shadow/commitdiff
* libmisc/rlogin.c: Replace atoi() by getulong().
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 28 Apr 2009 19:17:21 +0000 (19:17 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Tue, 28 Apr 2009 19:17:21 +0000 (19:17 +0000)
ChangeLog
libmisc/rlogin.c

index ee8166dfad3a1fd29e8a7c00b2ac9b89c41a16d1..a1db8d1a49978e134e13c784512a160e774a823b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-28  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * libmisc/rlogin.c: Replace atoi() by getulong().
+
 2009-04-28  Nicolas François  <nicolas.francois@centraliens.net>
 
        * libmisc/failure.c: Replace HAVE_UTMPX_H by USE_UTMPX.
index 2217c22025da8c8d6c178d133d5272f9b5ff7035..b4fd82f0f5caf61644dbb864c442cdfaf7e3b55f 100644 (file)
@@ -133,7 +133,7 @@ do_rlogin (const char *remote_host, char *name, size_t namelen, char *term,
        struct passwd *pwd;
        char remote_name[32];
        char *cp;
-       int remote_speed = 9600;
+       unsigned long remote_speed = 9600;
        int speed_name = B9600;
        int i;
        TERMIO termio;
@@ -147,8 +147,7 @@ do_rlogin (const char *remote_host, char *name, size_t namelen, char *term,
                *cp = '\0';
                cp++;
 
-               remote_speed = atoi (cp);
-               if (0 == remote_speed) {
+               if (getulong (cp, &remote_speed) == 0) {
                        remote_speed = 9600;
                }
        }