filename at 256 bytes.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3076
e7ae566f-a301-0410-adde-
c780ea21d3b5
return false;
#endif
+#if 0
+ {
+ struct gc_arena gc = gc_new ();
+ const char *fn = gen_path ("foo",
+ "bar",
+ &gc);
+ printf ("%s\n", fn);
+ gc_free (&gc);
+ }
+
+ return false;
+#endif
+
return true;
}
#endif
)
{
- struct buffer out = alloc_buf_gc (256, gc);
+ const size_t outsize = strlen(safe_filename) + (directory ? strlen (directory) : 0) + 16;
+ struct buffer out = alloc_buf_gc (outsize, gc);
char dirsep[2];
dirsep[0] = OS_SPECIFIC_DIRSEP;