[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Fix segfault in win32 unittests.
Update of /home/or/cvsroot/tor/src/common
In directory moria:/tmp/cvs-serv19083/src/common
Modified Files:
util.c
Log Message:
Fix segfault in win32 unittests.
Index: util.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/util.c,v
retrieving revision 1.221
retrieving revision 1.222
diff -u -d -r1.221 -r1.222
--- util.c 9 Sep 2005 21:34:59 -0000 1.221
+++ util.c 10 Sep 2005 02:34:32 -0000 1.222
@@ -1139,7 +1139,7 @@
}
result = smartlist_create();
while (1) {
- smartlist_add(result, findData.cFileName);
+ smartlist_add(result, tor_strdup(findData.cFileName));
if (!FindNextFile(handle, &findData)) {
if (GetLastError() != ERROR_NO_MORE_FILES) {
log_fn(LOG_WARN, "Error reading directory.");