mirror of
https://github.com/rfivet/uemacs.git
synced 2024-06-10 14:00:41 +00:00
Fix CID#39937 Copy into fixed size buffer.
This commit is contained in:
parent
dfc9a50fcf
commit
2522a858c1
17
input.c
17
input.c
|
@ -644,15 +644,14 @@ int getstring( const char *prompt, char *buf, int nbuf, int eolchar)
|
||||||
unlink( tmp) ;
|
unlink( tmp) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(tmp, "/tmp/meXXXXXX");
|
strcpy( tmp, "/tmp/meXXXXXX") ;
|
||||||
strcpy(ffbuf, "echo ");
|
xmkstemp( tmp) ;
|
||||||
strcat(ffbuf, buf);
|
if( strlen( buf) < sizeof ffbuf - 26 - 1)
|
||||||
if (!iswild)
|
sprintf( ffbuf, "echo %s%s >%s 2>&1", buf,
|
||||||
strcat(ffbuf, "*");
|
!iswild ? "*" : "", tmp) ;
|
||||||
strcat(ffbuf, " >");
|
else
|
||||||
xmkstemp(tmp);
|
sprintf( ffbuf, "echo ERROR >%s 2>&1", tmp) ;
|
||||||
strcat(ffbuf, tmp);
|
|
||||||
strcat(ffbuf, " 2>&1");
|
|
||||||
ue_system( ffbuf) ;
|
ue_system( ffbuf) ;
|
||||||
tmpf = fopen(tmp, "r");
|
tmpf = fopen(tmp, "r");
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user