summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD16
-rw-r--r--bookmark_items.patch12
-rw-r--r--configuration_strncpy.patch19
4 files changed, 49 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 52e3039b4e19..02494e193e8e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mbrowse
pkgdesc = A graphical SNMP MIB browser based on GTK+ and Net-SNMP
pkgver = 0.4.3
- pkgrel = 4
+ pkgrel = 5
url = https://sourceforge.net/projects/mbrowse/
arch = i686
arch = x86_64
@@ -9,7 +9,11 @@ pkgbase = mbrowse
depends = gtk2
depends = net-snmp
source = https://sourceforge.net/projects/mbrowse/files/0.4.3/mbrowse-0.4.3.tar.gz
+ source = bookmark_items.patch
+ source = configuration_strncpy.patch
sha256sums = 735a86a027659d3be39723d554758d6b51cce56ef3807efd5123d48ebf41506e
+ sha256sums = a6aad6155b9042d3f05a6d40fcb296d393fc84f036a6c73466ecd0f5183cb0de
+ sha256sums = ee3788fe3c127e3aae42fe5ceefdb8437b7b859a313d10ef3f9e604015af0473
pkgname = mbrowse
diff --git a/PKGBUILD b/PKGBUILD
index 18ee5da1c928..a08917fabea2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,24 @@
pkgname=mbrowse
pkgver=0.4.3
-pkgrel=4
+pkgrel=5
pkgdesc='A graphical SNMP MIB browser based on GTK+ and Net-SNMP'
arch=('i686' 'x86_64')
license=('GPL')
url='https://sourceforge.net/projects/mbrowse/'
depends=('gtk2' 'net-snmp')
-source=("https://sourceforge.net/projects/${pkgname}/files/${pkgver}/${pkgname}-${pkgver}.tar.gz")
-sha256sums=('735a86a027659d3be39723d554758d6b51cce56ef3807efd5123d48ebf41506e')
+source=("https://sourceforge.net/projects/${pkgname}/files/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ "bookmark_items.patch"
+ "configuration_strncpy.patch")
+sha256sums=('735a86a027659d3be39723d554758d6b51cce56ef3807efd5123d48ebf41506e'
+ 'a6aad6155b9042d3f05a6d40fcb296d393fc84f036a6c73466ecd0f5183cb0de'
+ 'ee3788fe3c127e3aae42fe5ceefdb8437b7b859a313d10ef3f9e604015af0473')
+
+prepare() {
+ cd $pkgname-$pkgver
+ patch -p1 <$srcdir/bookmark_items.patch
+ patch -p1 <$srcdir/configuration_strncpy.patch
+}
build() {
cd $pkgname-$pkgver
diff --git a/bookmark_items.patch b/bookmark_items.patch
new file mode 100644
index 000000000000..bd0d9a4a9c11
--- /dev/null
+++ b/bookmark_items.patch
@@ -0,0 +1,12 @@
+diff -ur a/src/callbacks.c b/src/callbacks.c
+--- a/src/callbacks.c 2010-11-16 05:20:23.000000000 -0500
++++ b/src/callbacks.c 2021-01-24 11:46:05.480076150 -0500
+@@ -28,7 +28,7 @@
+ extern int context_id;
+ extern int tview;
+
+-struct menu_items bookmark_items[128];
++extern struct menu_items bookmark_items[128];
+ extern int dont_select_damnit;
+ extern int dont_update_entry;
+ static struct tree *mibtree;
diff --git a/configuration_strncpy.patch b/configuration_strncpy.patch
new file mode 100644
index 000000000000..f57866b63225
--- /dev/null
+++ b/configuration_strncpy.patch
@@ -0,0 +1,19 @@
+diff -ur a/src/configuration.c b/src/configuration.c
+--- a/src/configuration.c 2010-11-12 08:28:33.000000000 -0500
++++ b/src/configuration.c 2021-01-24 12:00:12.112247854 -0500
+@@ -153,13 +153,14 @@
+ # define KEY 0
+ # define VAL 1
+
+- char line[1023];
++ char line[1024];
+ char *tok;
+ FILE *fp;
+ config_opt_t *c;
+ int state;
+ int lineno = 0;
+
++ line[sizeof(line)-1] = '\0';
+ #ifdef WIN32
+ strncpy(line,".\\",1023); /* FIXME: hack */
+ #else