git.samba.org
/
obnox
/
wireshark
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15754fa
)
As suggested by Jim Prince, pass the right argument to "getcwd()" - the
author
guy
<guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 18 May 2006 12:01:33 +0000
(12:01 +0000)
committer
guy
<guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 18 May 2006 12:01:33 +0000
(12:01 +0000)
buffer argument is a mallocated buffer, so sizeof doesn't return its
size, it returns the size of the pointer to the buffer. Fixes bug 907.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18186
f5534014
-38df-0310-8fa8-
9805f1628bb7
epan/filesystem.c
patch
|
blob
|
history
diff --git
a/epan/filesystem.c
b/epan/filesystem.c
index 24b93005994a15633e76023a1ab823bb21d0d400..d2b78fd13e296ea90f0743ade9a0e73510b2cc19 100644
(file)
--- a/
epan/filesystem.c
+++ b/
epan/filesystem.c
@@
-342,7
+342,7
@@
init_progfile_dir(const char *arg0
strerror(errno));
}
curdir = g_malloc(path_max);
- if (getcwd(curdir,
sizeof curdir
) == NULL) {
+ if (getcwd(curdir,
path_max
) == NULL) {
/*
* It failed - give up, and just stick
* with DATAFILE_DIR.