summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-04-23 10:54:16 +0200
committerByron Jones <bjones@mozilla.com>2012-04-23 10:54:16 +0200
commitd550fa977239535afe8bca6acbf3251f5de04b57 (patch)
tree9fba54ab1fc3b767c32a417f112ef843d03b171c
parentb66b079bb3ac4c736dd806b73de826faad0a8633 (diff)
downloadbugzilla-d550fa977239535afe8bca6acbf3251f5de04b57.tar.gz
bugzilla-d550fa977239535afe8bca6acbf3251f5de04b57.tar.xz
Bug 747110: Fix race condition in showdependencygraph.cgi triggering "use of uninitialized value" warnings.
r=LpSolit, a=LpSolit
-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;
}
}