aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-05-18 12:01:33 +0000
committerGuy Harris <guy@alum.mit.edu>2006-05-18 12:01:33 +0000
commit635ae7e19aad099a3d4c58f2b9e7fe3a8951d526 (patch)
tree16515e45d0e5ed2f7937e974f84e21d2b5b3a743
parent7866389ea461c48d8a7cde665747710d3c2efd8b (diff)
As suggested by Jim Prince, pass the right argument to "getcwd()" - the
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. svn path=/trunk/; revision=18186
-rw-r--r--epan/filesystem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/filesystem.c b/epan/filesystem.c
index 24b9300599..d2b78fd13e 100644
--- 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.