Gentoo-Probe
view release on metacpan or search on metacpan
t/sandbox/usr/portage/app-portage/gentoolkit/files/scripts/echangelog view on Meta::CPAN
die "Empty entry; aborting\n" unless $input =~ /\S/;
# If there are any long lines, then wrap the input at $columns chars
# (leaving 2 chars on each end after adding indentation below).
$input =~ s/^\s*(.*?)\s*\z/$1/s; # trim whitespace
$input = Text::Wrap::fill('', '', $input) if ($input =~ /^.{80}/m);
$input =~ s/^/ /gm; # add indentation
# Prepend the user info to the input
$user = $ENV{'ECHANGELOG_USER'} ||
sprintf("%s <%s\@gentoo.org>", (getpwuid($<))[6,0]);
# Make sure that we didn't get "root"
die "Please set ECHANGELOG_USER or run as non-root\n" if $user =~ / root@/;
$date = strftime("%d %b %Y", localtime);
$entry = "$date; $user ";
$entry .= join ', ', grep !/files.digest|Manifest/, @files; # don't list digests
$entry .= ':';
$entry = Text::Wrap::fill(' ', ' ', $entry); # does not append a \n
$entry .= "\n$input"; # append user input
# Find the version that's highest in the file (or determine if we're
t/sandbox/usr/portage/net-dns/hesiod/files/hesiod-3.0.2-str.patch view on Meta::CPAN
{
- while (*s1 && tolower(*s1) == tolower(*s2))
+ while (*s1 && *s2 && tolower(*s1) == tolower(*s2))
{
s1++;
s2++;
--- hesiod-3.0.2/hespwnam.c Wed Oct 3 15:29:40 2001
+++ hesiod-3.0.2/hespwnam.c Wed Oct 3 15:29:43 2001
@@ -39,9 +39,16 @@
struct passwd *hesiod_getpwuid(void *context, uid_t uid)
{
- char uidstr[16];
+ char uidstr[32];
- sprintf(uidstr, "%d", uid);
- return getpwcommon(context, uidstr, 1);
+ if (snprintf(uidstr, sizeof(uidstr), "%ld", (long)uid) < sizeof(uidstr))
+ {
+ return getpwcommon(context, uidstr, 1);
+ }
( run in 0.352 second using v1.01-cache-2.11-cpan-8d75d55dd25 )