[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1018061: pads: segfault at 3a ip



Am 26.02.23 um 16:47 schrieb Tim McConnell:

Hi Bernhard,
The delay is fine, I'm sure it takes a minute to figure it out ;-) and
no I didn't have anything other than defaults for GDB set. I'm not a
programmer so I don't know all the tricks to GDB or when is best   to
use them. With that said, how would I go about installing /testing the
patch you provide? I'm happy to test it out for you, I just need the
knowledge of how to.
Thanks!



Hello Tim,
if you are fine with installing a bunch of build dependencies
you could use following steps to rebuild the package with the patch.

As root:
# apt build-dep pads

As user:
$ mkdir -p source/pads

Put attached patch to the new directory and continue as user:
$ cd       source/pads
$ apt source pads
$ cd pads-1.2/
$ patch -p1 < ../pads_print_arp_asset_initialize.patch
$ dpkg-buildpackage -b

As root (with the directory adjusted to your user):
# dpkg -i /home/benutzer/source/pads/{pads_1.2-14_amd64.deb,pads-dbgsym_1.2-14_amd64.deb}


And then see if it still works as expected and see
if the crash happens again.

Kind regards,
Bernhard
--- a/src/output/output.c    2023-02-26 15:19:32.000000000 +0100
+++ b/src/output/output.c    2023-02-26 15:54:54.007679051 +0100
@@ -182,7 +182,7 @@ int print_arp_asset (struct in_addr ip_a
 
     /* Find Asset */
     ArpAsset *list;
-    ArpAsset *rec;
+    ArpAsset *rec = NULL;
 
      list = (ArpAsset *)get_arp_pointer();
      while (list != NULL) {
 

Reply to: