mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
Strndup usage and small typo fix
./src/pacman/package.c: - small typo fix ./src/pacman/pacman.c: - strdup is changed to strndup, because it's safer like in case of config option Signed-off-by: Laszlo Papp <djszapi2@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
44cddb351b
commit
6685822e57
@ -84,7 +84,7 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
|
||||
}
|
||||
|
||||
if(level>0) {
|
||||
/* compute this here so we don't get a puase in the middle of output */
|
||||
/* compute this here so we don't get a pause in the middle of output */
|
||||
requiredby = alpm_pkg_compute_requiredby(pkg);
|
||||
}
|
||||
|
||||
|
@ -437,7 +437,7 @@ static int parseargs(int argc, char *argv[])
|
||||
config->flags |= PM_TRANS_FLAG_ALLDEPS;
|
||||
break;
|
||||
case 1009:
|
||||
config->logfile = strdup(optarg);
|
||||
config->logfile = strndup(optarg, PATH_MAX);
|
||||
break;
|
||||
case 1010:
|
||||
list = strsplit(optarg, ',');
|
||||
|
Loading…
Reference in New Issue
Block a user