Fix obvious bug where we were returning a pointer to an automatic
authorTheodore Tso <tytso@mit.edu>
Wed, 1 Jul 1998 21:57:42 +0000 (21:57 +0000)
committerTheodore Tso <tytso@mit.edu>
Wed, 1 Jul 1998 21:57:42 +0000 (21:57 +0000)
variable which should have been a static.  Fortunately nothing in the
Mac tree was using inet_ntoa()....

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10606 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/os/ChangeLog
src/lib/krb5/os/macsock.c

index c9b7ece1f52b124e4f42dc0cf744cac199c08748..ac954b0de6bb4360130c08d59f5bb5a4770e06ff 100644 (file)
@@ -1,3 +1,10 @@
+Wed Jul  1 17:54:56 1998  Theodore Y. Ts'o  <tytso@mit.edu>
+
+       * macsock.c(inet_ntoa): Fix obvious bug where we were returning a
+               pointer to an automatic variable which should have been a
+               static.  Fortunately nothing in the Mac tree was using
+               inet_ntoa()....
+
 1998-05-06  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * t_std_conf.c (main): POSIX states that getopt returns -1
index bec7335521c74c7f7bc2f4f48b8757374a7e0553..a7f6b05a1b4ad8e2ac9a5973db24ed40bc59cb92 100644 (file)
@@ -526,7 +526,7 @@ char*
 inet_ntoa(struct in_addr ina) {
        OSErr err;
 #define        max_addr_str 16
-       char addrStr[max_addr_str];
+       static char addrStr[max_addr_str];
 
        err = AddrToStr(ina.s_addr, addrStr);
        return addrStr;