diff options
author | Brian Somers <brian@FreeBSD.org> | 2001-08-20 13:24:39 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 2001-08-20 13:24:39 +0000 |
commit | 36c1612b5e5d06b6eecf540564cfe84abe8a4ed1 (patch) | |
tree | cfffe027302e0b8a140748c6626dc30e92913ec1 /usr.sbin/pkg_install/create | |
parent | 327e849ae13cb617758d803daa79db381cd3f81f (diff) | |
download | src-36c1612b5e5d06b6eecf540564cfe84abe8a4ed1.tar.gz src-36c1612b5e5d06b6eecf540564cfe84abe8a4ed1.zip |
Handle snprintf() returning -1.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=81977
Diffstat (limited to 'usr.sbin/pkg_install/create')
-rw-r--r-- | usr.sbin/pkg_install/create/pl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/create/pl.c b/usr.sbin/pkg_install/create/pl.c index 3684def1da57..a0a34e00a8c6 100644 --- a/usr.sbin/pkg_install/create/pl.c +++ b/usr.sbin/pkg_install/create/pl.c @@ -190,7 +190,7 @@ copy_plist(char *home, Package *plist) p->name); last_chdir = home; } - if (add_count > maxargs - where_count) { + if (add_count == -1 || add_count > maxargs - where_count) { cleanup(0); errx(2, __FUNCTION__ ": oops, miscounted strings!"); } @@ -228,7 +228,7 @@ copy_plist(char *home, Package *plist) " -C %s %s", mythere ? mythere : where, p->name); - if (add_count > maxargs - where_count) { + if (add_count == -1 || add_count > maxargs - where_count) { cleanup(0); errx(2, __FUNCTION__ ": oops, miscounted strings!"); } |