]> The Tcpdump Group git mirrors - tcpdump/blobdiff - smbutil.c
Protect code for particular Juniper DLT_ values with #ifdefs, so this
[tcpdump] / smbutil.c
index 09ef803a5ce6ffd2a47e5a1e79007e95e83ec9ad..100b78316faf6b5c548dd776de29b0ef60ccaa4a 100644 (file)
--- a/smbutil.c
+++ b/smbutil.c
@@ -12,7 +12,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-     "@(#) $Header: /tcpdump/master/tcpdump/smbutil.c,v 1.35 2004-12-30 03:36:51 guy Exp $";
+     "@(#) $Header: /tcpdump/master/tcpdump/smbutil.c,v 1.36.2.1 2005-04-21 04:09:58 guy Exp $";
 #endif
 
 #include <tcpdump-stdinc.h>
@@ -428,7 +428,6 @@ smb_fdata1(const u_char *buf, const char *fmt, const u_char *maxbuf,
 {
     int reverse = 0;
     const char *attrib_fmt = "READONLY|HIDDEN|SYSTEM|VOLUME|DIR|ARCHIVE|";
-    int len;
 
     while (*fmt && buf<maxbuf) {
        switch (*fmt) {
@@ -608,6 +607,8 @@ smb_fdata1(const u_char *buf, const char *fmt, const u_char *maxbuf,
          {
            /*XXX unistr() */
            const char *s;
+           u_int32_t len;
+
            len = 0;
            s = unistr(buf, &len, (*fmt == 'R') ? 0 : unicodestr);
            if (s == NULL)
@@ -621,6 +622,8 @@ smb_fdata1(const u_char *buf, const char *fmt, const u_char *maxbuf,
        case 'Y':       /* like 'Z', but always ASCII */
          {
            const char *s;
+           u_int32_t len;
+
            TCHECK(*buf);
            if (*buf != 4 && *buf != 2) {
                printf("Error! ASCIIZ buffer of type %u", *buf);
@@ -649,7 +652,7 @@ smb_fdata1(const u_char *buf, const char *fmt, const u_char *maxbuf,
        case 'c':
          {
            TCHECK2(*buf, stringlen);
-           printf("%-*.*s", stringlen, stringlen, buf);
+           printf("%-*.*s", (int)stringlen, (int)stringlen, buf);
            buf += stringlen;
            fmt++;
            while (isdigit((unsigned char)*fmt))