projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
ead16d5
)
libkvm - Fix seg-fault in ps output when loading a process's argv
author
Matthew Dillon <dillon@apollo.backplane.com>
Thu, 1 Dec 2011 23:53:24 +0000 (15:53 -0800)
committer
Matthew Dillon <dillon@apollo.backplane.com>
Thu, 1 Dec 2011 23:53:24 +0000 (15:53 -0800)
* An offset calculation used when the string space is relocated by realloc
was being stored in an 'int' instead of a 'size_t', causing the
recalculated pointer to go wild.
lib/libkvm/kvm_proc.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/libkvm/kvm_proc.c
b/lib/libkvm/kvm_proc.c
index
95f64ef
..
2ccef66
100644
(file)
--- a/
lib/libkvm/kvm_proc.c
+++ b/
lib/libkvm/kvm_proc.c
@@
-675,7
+675,7
@@
kvm_argv(kvm_t *kd, pid_t pid, u_long addr, int narg, int maxcnt)
/* will we exceed the malloc/realloced buffer? */
if (len + cc > kd->arglen) {
- int off;
+ size_t off;
char **pp;
char *op = kd->argspc;