summaryrefslogtreecommitdiff
path: root/wiretap
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2008-05-08 09:37:11 +0000
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2008-05-08 09:37:11 +0000
commit7e40100fb3071f2be6e8e00643b73f352452dcd8 (patch)
tree563ae560a8d24603321e98f27ef2b2aa05952e52 /wiretap
parent723f40845eed18879f3c655656dcb49f1839a322 (diff)
downloadwireshark-7e40100fb3071f2be6e8e00643b73f352452dcd8.tar.gz
From Anders: Checkapi enabled for wiretap and more functions converted.
svn path=/trunk/; revision=25257
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/Makefile.nmake2
-rw-r--r--wiretap/iseries.c2
-rw-r--r--wiretap/k12.c2
-rw-r--r--wiretap/nettl.c13
4 files changed, 10 insertions, 9 deletions
diff --git a/wiretap/Makefile.nmake b/wiretap/Makefile.nmake
index e26ff117a6..e309251857 100644
--- a/wiretap/Makefile.nmake
+++ b/wiretap/Makefile.nmake
@@ -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
diff --git a/wiretap/iseries.c b/wiretap/iseries.c
index 8c7b970b64..50dc412c8a 100644
--- a/wiretap/iseries.c
+++ b/wiretap/iseries.c
@@ -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);
diff --git a/wiretap/k12.c b/wiretap/k12.c
index 5eb21d5721..a14feb665d 100644
--- a/wiretap/k12.c
+++ b/wiretap/k12.c
@@ -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);
diff --git a/wiretap/nettl.c b/wiretap/nettl.c
index baa0df8b64..dad9c02122 100644
--- a/wiretap/nettl.c
+++ b/wiretap/nettl.c
@@ -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)) {