ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [Ethereal-dev] Re: Bug report for ethereal-0.10.10 on Fedora x86_64 version (con

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Radek Vokal <rvokal@xxxxxxxxxx>
Date: Tue, 29 Mar 2005 13:56:24 +0200
Well, I don't agree that this is a widget problem. My debugging came to
this patch, which is really nasty way how to get it work. I really
wonder why is if_name set to NULL+1?! With the below patch ethereal
seems to work fine (tested with ethereal -i any -kS  on x86_64 machine) 

Radek

--- ethereal-0.10.10/capture_ui_utils.c.broken  2005-03-23
06:54:55.000000000 +0100
+++ ethereal-0.10.10/capture_ui_utils.c 2005-03-29 10:36:14.000000000
+0200
@@ -126,7 +126,8 @@
       if_entry = if_list;
       do {
         if_info = if_entry->data;
-        if (strcmp(if_info->name, if_name) == 0) {
+       
+        if (if_name != (NULL+1) && strcmp(if_info->name, if_name) == 0)
{
           if (if_info->description != NULL) {
             /* Return a copy of that - when we free the interface
                list, that'll also free up the strings to which
@@ -139,7 +140,7 @@
     }
     free_interface_list(if_list);
 
-    if (descr == NULL) {
+    if (descr == NULL && if_name != (NULL+1)) {
       /* The interface name is all we have, so just return a copy of
that. */
       descr = g_strdup(if_name);
     }


On Tue, 2005-03-22 at 22:26 +0100, Pierre JUHEN wrote:
> I am really stucked on this bug.
> 
> 
> Facts :
> 
> Ethereal 0.10.9 recompiled in the same environment in x86_64 mode is OK 
> (bug doesn't show up)
> 
> Ethereal 0.10.10 RPMs for i386 (Fedora Core 3)  mode are OK (bug doesn't 
> show up)
> 
> => bug is specific to the x86_64 version of 0.10.10 release.
> 
> Bug does occur only when doing synchronous capture.
> 
> Bug occurs wether autoscrolling is set or not.
> 
> 
> 
> Memory corruption seems to occur on this line :
> 
> menu.c : 863         if ((menu_item = 
> gtk_item_factory_get_widget(ifactory, dup)) != NULL) {
> 
> of
> 
> set_menu_sensitivity (ifactory=0xb88d30, path=0xb5a8a3 "", val=1) at 
> menu.c:863
> 
> ifactory seems to be OK.
> 
> dup =  "/Statistics/Service Response Time/Fibre Channel..."
> 
> before the execution of the line backtrace shows :
> 
> #0  set_menu_sensitivity (ifactory=0xb88d30, path=0xb5a8a3 "", val=1) at 
> menu.c:863
> #1  0x000000000043e08b in walk_menu_tree_for_selected_packet 
> (node=0xe92874, fd=0x0, edt=0x0) at menu.c:1690
> #2  0x000000000043e0a0 in walk_menu_tree_for_selected_packet 
> (node=0xe92874, fd=0x0, edt=0x0) at menu.c:1679
>     #3  0x000000000043e41b in set_menus_for_selected_packet 
> (cf=0x5fb100) at menu.c:1744
>     #4  0x00000000004294f8 in cf_unselect_packet (cf=0x5fb100) at 
> file.c:2963
>     #5  0x0000000000429cf1 in cf_reset_state (cf=0x5fb100) at file.c:286
>     #6  0x000000000042a59e in cf_open (cf=0x5fb100, fname=0xe44180 
> "/tmp/etherXXXXhBeFLC", is_tempfile=1, err=0x7fbfffd9c8) at file.c:194
> #7  0x000000000042a746 in cf_start_tail (cf=0x5fb100, fname=0xb5a8a4 "", 
> is_tempfile=15280242, err=0x0) at file.c:503
>     #8  0x0000000000424332 in sync_pipe_do_capture 
> (capture_opts=0x60b2e0, is_tempfile=1) at capture_sync.c:496
>     #9  0x00000000004232f5 in do_capture (capture_opts=0x60b2e0) at 
> capture.c:176
> 
> after the execution of the line, backtrace shows :
> 
> #0  set_menu_sensitivity (ifactory=0xb88d30, path=0xbddcd0 "\200S", 
> val=1) at menu.c:864
> #1  0x000000000043e08b in walk_menu_tree_for_selected_packet 
> (node=0xbddce0, fd=0x0, edt=0x0) at menu.c:1690
> #2  0x000000000043e0a0 in walk_menu_tree_for_selected_packet 
> (node=0xbddce0, fd=0x0, edt=0x0) at menu.c:1679
>     #3  0x000000000043e41b in set_menus_for_selected_packet 
> (cf=0x5fb100) at menu.c:1744
>     #4  0x00000000004294f8 in cf_unselect_packet (cf=0x5fb100) at 
> file.c:2963
>     #5  0x0000000000429cf1 in cf_reset_state (cf=0x5fb100) at file.c:286
>     #6  0x000000000042a59e in cf_open (cf=0x5fb100, fname=0xe44180 
> "/tmp/etherXXXXhBeFLC", is_tempfile=1, err=0x7fbfffd9c8) at file.c:194
> #7  0x000000000042a746 in cf_start_tail (cf=0x5fb100, fname=0x190 
> <Address 0x190 out of bounds>, is_tempfile=-536870874, err=0x50) at 
> file.c:503
>     #8  0x0000000000424332 in sync_pipe_do_capture 
> (capture_opts=0x60b2e0, is_tempfile=1) at capture_sync.c:496
>     #9  0x00000000004232f5 in do_capture (capture_opts=0x60b2e0) at 
> capture.c:176
> 
> (unmodified lines are indented)
> 
> 
> 
> Now I need hints to go further....
> 
> Thanks,
> 
> Pierre JUHEN
> 
> 
> 
> 
-- 
Radek Vokál     <rvokal@xxxxxxxxxx> 
OS Systems Engineer
        IT executives rate Red Hat #1 for value
        http://www.redhat.com/promo/vendor/index.html