Pull from CVS HEAD:
authorphampson <phampson>
Thu, 17 Mar 2005 13:52:43 +0000 (13:52 +0000)
committerphampson <phampson>
Thu, 17 Mar 2005 13:52:43 +0000 (13:52 +0000)
Allow checkrad to be called successfully with ports > 9999999 without
trashing memory.
 Spotted and initial patch by Eddie Stassen

doc/ChangeLog
src/main/session.c

index 27451df..7ac6234 100644 (file)
@@ -1,4 +1,7 @@
-FreeRADIUS 1.0.2 ; $Date$, urgency=medium
+FreeRADIUS 1.0.3 ; $Date$, urgency=medium
+       * Fix bug in calling checkrad script with NAS port > 9999999
+
+FreeRADIUS 1.0.2 ; Date: 2005/02/13 01:03:20, urgency=medium
        * Novell eDirectoty support.  Patch from Novell.
        * localweb & Trapeze dictionary updates.
        * EAP-SIM fixes.
index 02ef411..daafe30 100644 (file)
@@ -127,7 +127,7 @@ int rad_check_ts(uint32_t nasaddr, unsigned int portnum, const char *user,
        int     status;
        int     n;
        char    address[16];
-       char    port[8];
+       char    port[11];
        RADCLIENT *cl;
 
        /*
@@ -212,7 +212,7 @@ int rad_check_ts(uint32_t nasaddr, unsigned int portnum, const char *user,
         */
 
        ip_ntoa(address, nasaddr);
-       sprintf(port, "%u", portnum);
+       snprintf(port, 11, "%u", portnum);
 
 #ifdef __EMX__
        /* OS/2 can't directly execute scripts then we call the command