]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-linux.c
plugins/passprompt: Fix potential out-of-bounds array reference
[ppp.git] / pppd / sys-linux.c
index 4fe221d86549ba9efeb204db375e093eebfceba0..72a7727c403f79762a93bf1342e3b02aa869c27a 100644 (file)
@@ -2147,6 +2147,7 @@ int ppp_available(void)
     return ok;
 }
 
+#ifndef HAVE_LOGWTMP
 /********************************************************************
  *
  * Update the wtmp file with the appropriate user name and tty device.
@@ -2220,7 +2221,7 @@ void logwtmp (const char *line, const char *name, const char *host)
     }
 #endif
 }
-
+#endif /* HAVE_LOGWTMP */
 
 /********************************************************************
  *
@@ -2878,7 +2879,7 @@ ether_to_eui64(eui64_t *p_eui64)
     /*
      * And convert the EUI-48 into EUI-64, per RFC 2472 [sec 4.1]
      */
-    ptr = ifr.ifr_hwaddr.sa_data;
+    ptr = (unsigned char *) ifr.ifr_hwaddr.sa_data;
     p_eui64->e8[0] = ptr[0] | 0x02;
     p_eui64->e8[1] = ptr[1];
     p_eui64->e8[2] = ptr[2];