diff options
author | scheidell <scheidell@FreeBSD.org> | 2012-05-12 03:22:54 +0800 |
---|---|---|
committer | scheidell <scheidell@FreeBSD.org> | 2012-05-12 03:22:54 +0800 |
commit | 4305ef81a6ab58afde18272720aff3a41f580d50 (patch) | |
tree | f59ca2eba845322a237d92e1c673401994a3e70f /net-mgmt | |
parent | d502042c97ac09d98db8c5136c593ada657e3bb8 (diff) | |
download | freebsd-ports-gnome-4305ef81a6ab58afde18272720aff3a41f580d50.tar.gz freebsd-ports-gnome-4305ef81a6ab58afde18272720aff3a41f580d50.tar.zst freebsd-ports-gnome-4305ef81a6ab58afde18272720aff3a41f580d50.zip |
- fix rateup's coredump
PR: ports/167771
Submitted by: "Alexey V. Panfilov" <ports@subnets.ru> (maintainer)
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/mrtg/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/mrtg/files/patch-src__rateup.c | 36 |
2 files changed, 37 insertions, 0 deletions
diff --git a/net-mgmt/mrtg/Makefile b/net-mgmt/mrtg/Makefile index 98887f868126..01fc40a37ce6 100644 --- a/net-mgmt/mrtg/Makefile +++ b/net-mgmt/mrtg/Makefile @@ -7,6 +7,7 @@ PORTNAME= mrtg PORTVERSION= 2.17.4 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net-mgmt ipv6 MASTER_SITES= http://oss.oetiker.ch/mrtg/pub/ \ diff --git a/net-mgmt/mrtg/files/patch-src__rateup.c b/net-mgmt/mrtg/files/patch-src__rateup.c new file mode 100644 index 000000000000..70af0fab3496 --- /dev/null +++ b/net-mgmt/mrtg/files/patch-src__rateup.c @@ -0,0 +1,36 @@ +--- src/rateup.c.orig 2012-05-10 05:40:49.259760823 -0300 ++++ src/rateup.c 2012-05-10 05:44:32.297657818 -0300 +@@ -1132,9 +1132,10 @@ + gdImageDestroy (brush_outp); + free (lhist); + free (graph_label); +- if (kMG) ++ if (kMG) { + free(short_si); +- ++ short_si = short_si_def; ++ } + + #ifdef WIN32 + /* got to remove the target under win32 +@@ -1563,8 +1564,10 @@ + } + else + { +- strcpy (last.in, in); +- strcpy (last.out, out); ++ strncpy (last.in, in, MAXL); ++ last.in[MAXL-1]='\0'; ++ strncpy (last.out, out,MAXL); ++ last.out[MAXL-1]='\0'; + } + fprintf (fo, "%lu " LLD " " LLD " " LLD " " LLD "\n", + (unsigned long) now, inrate, outrate, inrate, outrate); +@@ -2114,6 +2117,7 @@ + history[x].in = rand () % atoi (argv[argi + 1]); + history[x].out = rand () % atoi (argv[argi + 2]); + } ++ /* fallthrough */ + case 'u': /* Update file */ + if (argv[argi][1] == 'p') + {
\ No newline at end of file |