aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-04-23 16:54:16 +0800
committerByron Jones <bjones@mozilla.com>2012-04-23 16:54:16 +0800
commitd550fa977239535afe8bca6acbf3251f5de04b57 (patch)
tree9fba54ab1fc3b767c32a417f112ef843d03b171c /showdependencygraph.cgi
parentBug 349015: importxml.pl throws a warning if there is no bug status defined (diff)
downloadbugzilla-d550fa977239535afe8bca6acbf3251f5de04b57.tar.gz
bugzilla-d550fa977239535afe8bca6acbf3251f5de04b57.tar.bz2
bugzilla-d550fa977239535afe8bca6acbf3251f5de04b57.zip
Bug 747110: Fix race condition in showdependencygraph.cgi triggering "use of uninitialized value" warnings.
r=LpSolit, a=LpSolit
Diffstat (limited to 'showdependencygraph.cgi')
-rwxr-xr-xshowdependencygraph.cgi3
1 files changed, 2 insertions, 1 deletions
diff --git a/showdependencygraph.cgi b/showdependencygraph.cgi
index de6caa459..32abf1747 100755
--- a/showdependencygraph.cgi
+++ b/showdependencygraph.cgi
@@ -296,7 +296,8 @@ foreach my $f (@files)
# symlinks), this can't escape to delete anything it shouldn't
# (unless someone moves the location of $webdotdir, of course)
trick_taint($f);
- if (file_mod_time($f) < $since) {
+ my $mtime = file_mod_time($f);
+ if ($mtime && $mtime < $since) {
unlink $f;
}
}