Ensure pcapng application name is dynamically allocated
authorEvan Huus <eapache@gmail.com>
Mon, 22 Sep 2014 20:55:32 +0000 (16:55 -0400)
committerEvan Huus <eapache@gmail.com>
Mon, 22 Sep 2014 20:56:19 +0000 (20:56 +0000)
I was hasty with my original fix...

Change-Id: I339994c1afc34274a5d73eff98c4ebbf030e0f36
Reviewed-on: https://code.wireshark.org/review/4255
Reviewed-by: Evan Huus <eapache@gmail.com>
file.c

diff --git a/file.c b/file.c
index 7b937285d4478eb45d8314d026f12bf90247ec2b..b73b598d7c9af0622ce31dbddb7192198521ef03 100644 (file)
--- a/file.c
+++ b/file.c
@@ -1363,7 +1363,7 @@ cf_merge_files(char **out_filenamep, int in_file_count,
                                           /*  description of the hardware used to create this section. */
     shb_hdr->shb_os        = NULL;        /* NULL if not available, UTF-8 string containing the name   */
                                           /*  of the operating system used to create this section.     */
-    shb_hdr->shb_user_appl = "Wireshark"; /* NULL if not available, UTF-8 string containing the name   */
+    shb_hdr->shb_user_appl = g_strdup("Wireshark"); /* NULL if not available, UTF-8 string containing the name   */
                                           /*  of the application used to create this section.          */
 
     /* create fake IDB info */