From Anders: Checkapi enabled for wiretap and more functions converted.
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 8 May 2008 09:37:11 +0000 (09:37 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 8 May 2008 09:37:11 +0000 (09:37 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25257 f5534014-38df-0310-8fa8-9805f1628bb7

wiretap/Makefile.nmake
wiretap/iseries.c
wiretap/k12.c
wiretap/nettl.c

index e26ff117a61af9272c902bc951eb09071a22296d..e30925185773ebd0bd451ef46d7eb32ce2d46ef1 100644 (file)
@@ -23,7 +23,7 @@ wiretap_LIBS = \
        $(GLIB_LIBS)    \
        $(ZLIB_LIBS)
 
-all: wiretap-$(WTAP_VERSION).dll
+all: checkapi wiretap-$(WTAP_VERSION).dll
 
 wiretap-$(WTAP_VERSION).lib: wiretap-$(WTAP_VERSION).dll
 wiretap-$(WTAP_VERSION).exp: wiretap-$(WTAP_VERSION).dll
index 8c7b970b643978ee66b13cbec52286ae2c1121a2..50dc412c8ae4733eb0d8f82a36c5541e3cad3994 100644 (file)
@@ -275,7 +275,7 @@ iseries_check_file_type (wtap * wth, int *err, int format)
            {
              iseries_UNICODE_to_ASCII ((guint8 *)buf, ISERIES_LINE_LENGTH);
            }
-         g_strup(buf);
+         g_ascii_strup(buf,ISERIES_LINE_LENGTH);
          num_items_scanned = sscanf (buf,
                                      "   OBJECT PROTOCOL  . . . . . . :  %8s",
                                      protocol);
index 5eb21d57211ebd0581435faaa95eda6a6e26c139..a14feb665d6dd0cf095700ad94fb69a3062c6125 100644 (file)
@@ -684,7 +684,7 @@ int k12_open(wtap *wth, int *err, gchar **err_info _U_) {
             rec->input_name = g_memdup(read_buffer + K12_SRCDESC_EXTRATYPE + extra_len, name_len);
             rec->stack_file = g_memdup(read_buffer + K12_SRCDESC_EXTRATYPE + extra_len + name_len, stack_len);
 
-            g_strdown(rec->stack_file);
+            g_ascii_strdown (rec->stack_file,stack_len);
 
             g_hash_table_insert(file_data->src_by_id,GUINT_TO_POINTER(rec->input),rec);
             g_hash_table_insert(file_data->src_by_name,rec->stack_file,rec);
index baa0df8b642f0d2691946c4e29a4dbbf5b217cb6..dad9c0212289aa72a661fce1bb3d8b137adb024e 100644 (file)
@@ -50,10 +50,11 @@ static guint8 nettl_magic_hpux10[MAGIC_SIZE] = {
 };
 
 #define FILE_HDR_SIZE  128
+#define NETTL_FILENAME_SIZE 56
 
 struct nettl_file_hdr {
     guint8     magic[MAGIC_SIZE];
-    gchar      file_name[56];
+    gchar      file_name[NETTL_FILENAME_SIZE];
     gchar      tz[20];
     gchar      host_name[9];
     gchar      os_vers[9];
@@ -724,12 +725,12 @@ gboolean nettl_dump_open(wtap_dumper *wdh, gboolean cant_seek _U_, int *err)
        /* Write the file header. */
        memset(&file_hdr,0,sizeof(file_hdr));
        memcpy(file_hdr.magic,nettl_magic_hpux10,sizeof(file_hdr.magic));
-       strcpy(file_hdr.file_name,"/tmp/wireshark.TRC000");
-       strcpy(file_hdr.tz,"UTC");
-       strcpy(file_hdr.host_name,"");
-       strcpy(file_hdr.os_vers,"B.11.11");
+       g_strlcpy(file_hdr.file_name,"/tmp/wireshark.TRC000",NETTL_FILENAME_SIZE);
+       g_strlcpy(file_hdr.tz,"UTC",20);
+       g_strlcpy(file_hdr.host_name,"",9);
+       g_strlcpy(file_hdr.os_vers,"B.11.11",9);
        file_hdr.os_v=0x55;
-       strcpy(file_hdr.model,"9000/800");
+       g_strlcpy(file_hdr.model,"9000/800",11);
        file_hdr.unknown=g_htons(0x406);
        nwritten = fwrite(&file_hdr, 1, sizeof file_hdr, wdh->fh);
        if (nwritten != sizeof(file_hdr)) {