* environ.cc (parse_options): Use tmp_pathbuf to allocate buffer.
(regopt): Take tmp buffer as additional argument. (environ_init): Alllcate tmpbuf earlier. Use as temporary buffer in call to regopt. * tls_pbuf.cc (tmp_pathbuf::c_get): Allocate one additional char. (tmp_pathbuf::w_get): Allocate one additional WCHAR. * winf.cc (av::unshift): Use tmp_pathbuf to allocate buffer.
This commit is contained in:
@@ -15,6 +15,7 @@ details. */
|
||||
#include "fhandler.h"
|
||||
#include "dtable.h"
|
||||
#include "cygheap.h"
|
||||
#include "tls_pbuf.h"
|
||||
#include "winf.h"
|
||||
#include "sys/cygwin.h"
|
||||
|
||||
@@ -136,7 +137,8 @@ av::unshift (const char *what, int conv)
|
||||
|
||||
argv = av;
|
||||
memmove (argv + 1, argv, (argc + 1) * sizeof (char *));
|
||||
char buf[CYG_MAX_PATH];
|
||||
tmp_pathbuf tp;
|
||||
char *buf = tp.c_get ();
|
||||
if (conv)
|
||||
{
|
||||
cygwin_conv_to_posix_path (what, buf);
|
||||
|
Reference in New Issue
Block a user