mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
Initialize the argument list in the unpack() routine to zero.
This prevents a core dump due to the stack being trashed if pkg_add is asked to process something that really isn't a package file.
This commit is contained in:
parent
d7e0e5ca0f
commit
247f99f51f
1 changed files with 2 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef lint
|
||||
static const char *rcsid = "$Id: file.c,v 1.18 1995/10/31 20:30:18 jkh Exp $";
|
||||
static const char *rcsid = "$Id: file.c,v 1.19 1995/11/12 04:55:38 jkh Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -436,6 +436,7 @@ unpack(char *pkg, char *flist)
|
|||
* Figure out by a crude heuristic whether this or not this is probably
|
||||
* compressed.
|
||||
*/
|
||||
args[0] = '\0';
|
||||
cp = rindex(pkg, '.');
|
||||
if (cp) {
|
||||
strcpy(suffix, cp + 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue