Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PERFORCE change 176834 for review

0 views
Skip to first unread message

Garrett Cooper

unread,
Apr 12, 2010, 9:38:02 AM4/12/10
to Perforce Change Reviews
http://p4web.freebsd.org/@@176834?ac=10

Change 176834 by gcooper@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);

0 new messages