mirror of
https://git.freebsd.org/ports.git
synced 2025-06-06 05:10:29 -04:00
Add a patch to fix a couple of memory handling problems which show up with
MALLOC_OPTIONS=AJ.
This commit is contained in:
parent
62b27d04c9
commit
c2a9a076ef
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=36839
2 changed files with 52 additions and 0 deletions
26
net-mgmt/nstreams/files/patch-aa
Normal file
26
net-mgmt/nstreams/files/patch-aa
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
--- src/nstreams.c Thu Nov 11 22:13:14 1999
|
||||||
|
+++ src/nstreams.c Fri Dec 29 07:04:41 2000
|
||||||
|
@@ -179,6 +179,7 @@
|
||||||
|
char * output_name = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
+ bzero(cache, sizeof(struct cache));
|
||||||
|
|
||||||
|
|
||||||
|
parser = parse_tcpdump_line;
|
||||||
|
--- src/output.c Thu Nov 11 22:13:15 1999
|
||||||
|
+++ src/output.c Fri Dec 29 07:20:51 2000
|
||||||
|
@@ -122,11 +122,11 @@
|
||||||
|
else {
|
||||||
|
ret->sports = malloc(10);
|
||||||
|
sprintf(ret->sports, "%d", ret->sport);
|
||||||
|
- realloc(ret->sports, strlen(ret->sports)+1);
|
||||||
|
+ ret->sports = realloc(ret->sports, strlen(ret->sports)+1);
|
||||||
|
|
||||||
|
ret->dports = malloc(10);
|
||||||
|
sprintf(ret->dports, "%d", ret->dport);
|
||||||
|
- realloc(ret->dports, strlen(ret->dports)+1);
|
||||||
|
+ ret->dports = realloc(ret->dports, strlen(ret->dports)+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
ret->show_net = shownet;
|
26
net/nstreams/files/patch-aa
Normal file
26
net/nstreams/files/patch-aa
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
--- src/nstreams.c Thu Nov 11 22:13:14 1999
|
||||||
|
+++ src/nstreams.c Fri Dec 29 07:04:41 2000
|
||||||
|
@@ -179,6 +179,7 @@
|
||||||
|
char * output_name = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
+ bzero(cache, sizeof(struct cache));
|
||||||
|
|
||||||
|
|
||||||
|
parser = parse_tcpdump_line;
|
||||||
|
--- src/output.c Thu Nov 11 22:13:15 1999
|
||||||
|
+++ src/output.c Fri Dec 29 07:20:51 2000
|
||||||
|
@@ -122,11 +122,11 @@
|
||||||
|
else {
|
||||||
|
ret->sports = malloc(10);
|
||||||
|
sprintf(ret->sports, "%d", ret->sport);
|
||||||
|
- realloc(ret->sports, strlen(ret->sports)+1);
|
||||||
|
+ ret->sports = realloc(ret->sports, strlen(ret->sports)+1);
|
||||||
|
|
||||||
|
ret->dports = malloc(10);
|
||||||
|
sprintf(ret->dports, "%d", ret->dport);
|
||||||
|
- realloc(ret->dports, strlen(ret->dports)+1);
|
||||||
|
+ ret->dports = realloc(ret->dports, strlen(ret->dports)+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
ret->show_net = shownet;
|
Loading…
Add table
Reference in a new issue