PERFORCE change 176834 for review
Garrett Cooper
gcooper at FreeBSD.org
Mon Apr 12 13:38:03 UTC 2010
http://p4web.freebsd.org/@@176834?ac=10
Change 176834 by gcooper at gcooper-bayonetta on 2010/04/12 13:37:24
Avoid a potential segfault because of uninitialized data.
Affected files ...
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/lib/file.c#12 edit
Differences ...
==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/lib/file.c#12 (text+ko) ====
@@ -377,8 +377,14 @@
/* int fd = -1; */
int r;
+ if (pkg == NULL || strcmp(pkg, "-") == 0)
+ pkg_name_humanized = "(stdin)";
+ else
+ pkg_name_humanized = pkg;
+
if (Verbose)
- printf("%s: will extract %s from %s\n", __func__, file, pkg);
+ printf("%s: will extract %s from %s\n",
+ __func__, file, pkg_name_humanized);
archive = archive_read_new();
archive_read_support_compression_all(archive);
More information about the p4-projects
mailing list