Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/dist/bind/bin/nslookup Pull up revision 1.3 (requested ...



details:   https://anonhg.NetBSD.org/src/rev/0662c4085c83
branches:  netbsd-1-6
changeset: 528156:0662c4085c83
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Jun 28 11:36:03 2002 +0000

description:
Pull up revision 1.3 (requested by itojun in ticket #387):
Update to BIND 8.3.3.  Fixes buffer overrun in resolver code.

diffstat:

 dist/bind/bin/nslookup/commands.l |  37 +++++++++++++++++++------------------
 1 files changed, 19 insertions(+), 18 deletions(-)

diffs (128 lines):

diff -r e7c2a91e6c3c -r 0662c4085c83 dist/bind/bin/nslookup/commands.l
--- a/dist/bind/bin/nslookup/commands.l Fri Jun 28 11:35:53 2002 +0000
+++ b/dist/bind/bin/nslookup/commands.l Fri Jun 28 11:36:03 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: commands.l,v 1.2 2001/01/27 07:22:01 itojun Exp $      */
+/*     $NetBSD: commands.l,v 1.2.2.1 2002/06/28 11:36:03 lukem Exp $   */
 
 %{
 
@@ -99,6 +99,7 @@
 #include <sys/types.h>
 #include <netinet/in.h>
 #include "port_after.h"
+#include <resolv.h>
 #include "res.h"
 
 extern char rootServerName[];
@@ -107,9 +108,9 @@
 
 %}
 WS     [ \t]
-FLET   [A-Za-z0-9.*\\_]
-LET    [A-Za-z0-9.*_]
-NAME   [A-Za-z0-9.*=_/-]
+FLET   [:A-Za-z0-9.*\\_]
+LET    [:A-Za-z0-9.*_]
+NAME   [:A-Za-z0-9.*=_/-]
 %%
 ^{WS}*server{WS}+{LET}{NAME}*{WS}*$    {
                                            /*
@@ -118,11 +119,11 @@
                                             * 1 == use original server to find
                                             *      the new one.
                                             */
-                                           SetDefaultServer(yytext, 0);
+                                           SetDefaultServer((char*)yytext, 0);
                                            return(1);
                                        }
 ^{WS}*lserver{WS}+{LET}{NAME}*{WS}*$   {
-                                           SetDefaultServer(yytext, 1);
+                                           SetDefaultServer((char*)yytext, 1);
                                            return(1);
                                        }
 ^{WS}*exit{WS}*$                       {
@@ -138,11 +139,11 @@
                                             *  0 == output to stdout
                                             *  1 == output to file
                                             */
-                                           Finger(yytext, 1);
+                                           Finger((char*)yytext, 1);
                                            return(1);
                                        }
 ^{WS}*finger({WS}+{LET}{NAME}*)?{WS}*$ {
-                                           Finger(yytext, 0);
+                                           Finger((char*)yytext, 0);
                                            return(1);
                                        }
 ^{WS}*ls{WS}+(("-a"|"-d"|"-h"|"-m"|"-s"){WS}+)?{LET}{NAME}*{WS}+>>?{WS}+{NAME}+{WS}*$  {
@@ -151,11 +152,11 @@
                                             *  0 == output to stdout
                                             *  1 == output to file
                                             */
-                                           ListHosts(yytext, 1);
+                                           ListHosts((char*)yytext, 1);
                                            return(1);
                                        }
 ^{WS}*ls{WS}+(("-a"|"-d"|"-h"|"-m"|"-s"){WS}+)?{LET}{NAME}*{WS}*$      {
-                                           ListHosts(yytext, 0);
+                                           ListHosts((char*)yytext, 0);
                                            return(1);
                                        }
 ^{WS}*ls{WS}+-t{WS}+({LET}{NAME}*{WS}+)?{LET}{NAME}*{WS}+>>?{WS}+{NAME}+{WS}*$ {
@@ -164,15 +165,15 @@
                                             *  0 == output to stdout
                                             *  1 == output to file
                                             */
-                                           ListHostsByType(yytext, 1);
+                                           ListHostsByType((char*)yytext, 1);
                                            return(1);
                                        }
 ^{WS}*ls{WS}+-t{WS}+({LET}{NAME}*{WS}+)?{LET}{NAME}*{WS}*$ {
-                                           ListHostsByType(yytext, 0);
+                                           ListHostsByType((char*)yytext, 0);
                                            return(1);
                                        }
 ^{WS}*set{WS}+{NAME}+{WS}*$            {
-                                           SetOption(yytext);
+                                           SetOption((char*)yytext);
                                            return(1);
                                        }
 ^{WS}*help{WS}*$                       {
@@ -190,11 +191,11 @@
                                             * 0 == output to stdout
                                             * 1 == output to file
                                             */
-                                           LookupHost(yytext, 1);
+                                           LookupHost((char*)yytext, 1);
                                            return(1);
                                        }
 ^{WS}*{FLET}{NAME}*{WS}*$              {
-                                           LookupHost(yytext, 0);
+                                           LookupHost((char*)yytext, 0);
                                            return(1);
                                        }
 ^{WS}*{FLET}{NAME}*{WS}+{LET}{NAME}*{WS}+>>?{WS}*{NAME}+{WS}*$ {
@@ -202,11 +203,11 @@
                                             * 0 == output to stdout
                                             * 1 == output to file
                                             */
-                                           LookupHostWithServer(yytext, 1);
+                                           LookupHostWithServer((char*)yytext, 1);
                                            return(1);
                                        }
 ^{WS}*{FLET}{NAME}*{WS}+{LET}{NAME}*{WS}*$     {
-                                           LookupHostWithServer(yytext, 0);
+                                           LookupHostWithServer((char*)yytext, 0);
                                            return(1);
                                        }
 ^{WS}*\n                               {
@@ -214,7 +215,7 @@
                                        }
 ^.*\n                                  {
                                            printf("Unrecognized command: %s",
-                                                       yytext);
+                                                       (char*)yytext);
                                            return(1);
                                        }
 \n                                     { ; }



Home | Main Index | Thread Index | Old Index