Prevent buffer overflow when using a scriptlet shell with a long path
Observed in Nixpkgs. Fixes #157. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
9f8f94c056
commit
479f4d574a
1 changed files with 1 additions and 1 deletions
|
@ -337,7 +337,7 @@ static int grep(const char *fn, const char *needle)
|
|||
int _alpm_runscriptlet(alpm_handle_t *handle, const char *filepath,
|
||||
const char *script, const char *ver, const char *oldver, int is_archive)
|
||||
{
|
||||
char arg0[64], arg1[3], cmdline[PATH_MAX];
|
||||
char arg0[PATH_MAX], arg1[3], cmdline[PATH_MAX];
|
||||
char *argv[] = { arg0, arg1, cmdline, NULL };
|
||||
char *tmpdir, *scriptfn = NULL, *scriptpath;
|
||||
int retval = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue